Fwd: [Xerte] Get iconID of parent icon in Xerte3
Peter Huppertz
peter.huppertz at baselgovernance.org
Wed Jun 9 16:07:11 BST 2010
Just to bump this issue again. Bubbling would make my piece extremely more simple. Any idea what's wrong?
Begin forwarded message:
> From: Peter Huppertz <peter.huppertz at baselgovernance.org>
> Date: 20. Mai 2010 09:12:18 MESZ
> To: Xerte discussion list <xerte at lists.nottingham.ac.uk>
> Subject: Re: [Xerte] Get iconID of parent icon in Xerte3
>
> 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
>
==================================
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20100609/88eefa77/attachment.html
More information about the Xerte
mailing list