[Xerte] Get iconID of parent icon in Xerte3
Peter Huppertz
peter.huppertz at baselgovernance.org
Thu May 20 08:12:18 BST 2010
That sounds like a fantastic idea, unfortunately I'm not sure where I got it wrong. This is what I did:
Canvas
--picture1
--picture2
--picture3
--Event Handler (rollOver/debug(event.currentTarget))
It works so far, that the event only dispatches when I roll over one of the three images. But the debug output is always Canvas. I would be perfect if it would be picture1, picture2 ... What's wrong?
Thanks,
Peter
Am 19.05.2010 um 21:42 schrieb Julian Tenney:
> in the event handler
>
> debug(event.target);
>
> thats the broadcasting icon, which is what you want.
>
> In the examples is there one for bubbling events? They are very cool. If you have a page of components, then you can put an event handler on the page itself for, say, rollOver, and then in the page's rollOver event handler, you can get event.currentTarget for the actual icon being rolled over (I think rollOver bubbles). That can lead to seriously effiecient code compared to having to set up event handlers on each icon. The help will tell you which events bubble,
>
> J
>
> From: xerte-bounces at lists.nottingham.ac.uk on behalf of Peter Huppertz
> Sent: Wed 19/05/2010 19:03
> To: Xerte discussion list
> Subject: Re: [Xerte] Get iconID of parent icon in Xerte3
>
> I need to get the parent iconID of a EventHandler icon, but the EventHandler icon does not seem to have the iconID property, or is it just missing in the built, I use?
>
> Peter
>
> Am 19.05.2010 um 17:11 schrieb Julian Tenney:
>
>> there is no icon.
>>
>> Give an icon the property iconID, say myIconID
>>
>> then myIconID.parent is the way to go,
>>
>> debug(myIconID) to check you've got the right fella in there,
>>
>> J
>>
>> From: xerte-bounces at lists.nottingham.ac.uk on behalf of Peter Huppertz
>> Sent: Wed 19/05/2010 14:51
>> To: Xerte discussion list
>> Subject: [Xerte] Get iconID of parent icon in Xerte3
>>
>> Can anyone tell me the command to get hold of the iconID of a parent icon in Xerte3? icon.parent or parent does not seem to do the trick ...
>>
>> Thanks,
>>
>> Peter
>>
>>
>> ==================================
>> Peter Huppertz
>> E-learning and IT Specialist
>> International Centre for Asset Recovery
>> Basel Institute on Governance
>> Phone: +41 61 205 55 18
>> Fax: +41 61 267 55 19
>>
>> _______________________________________________
>> Xerte mailing list
>> Xerte at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>>
>> _______________________________________________
>> Xerte mailing list
>> Xerte at lists.nottingham.ac.uk
>> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20100520/1cd8fdb1/attachment.html
More information about the Xerte
mailing list