Hi Alex,
thanks for the explanation, so if I understand right, there's not problem
with currentTarget, only that I was trying to use in an incorrect way.
And that the right way to deal with this concrete behavior is through
CHANGE event like I finaly did.
I'm ok as well with the fact that
Hi Carlos,
If I understand the code correctly, you are getting null because you are
listening for click on Navigation not each individual NavigationRenderer.
currentTarget will be the Navigation. The way currentTarget works is specified
by the W3C, not us.
This is a good example of how each
Hi,
just solved the problem with this code in JewelExample changing to "CHANGE"
event:
import vos.NavigationLinkVO;
private function changeHandler(event:Event):void
{
var item:NavigationLinkVO = (event.target as Navigation).selectedItem as
NavigationLinkVO;
main.showContent(item.href);
Hi Alex,
taking into account the code from JewelExample I just posted. This code:
private function clickHandler(event:MouseEvent):void
{
var renderer:INavigationRenderer = event.currentTarget as
INavigationRenderer;
trace(renderer);
}
shows a trace = null, whatever place you click on the
behalf of
> Carlos Rovira
> Sent: Tuesday, July 3, 2018 12:44:17 AM
> To: dev@royale.apache.org
> Subject: Re: List Item renderer Click event finds a component in its way
>
> Hi Yishay,
>
> thanks for let me know about it. I'm playing with it but I didn't get to
> work.
>
: Tuesday, July 3, 2018 12:44:17 AM
To: dev@royale.apache.org
Subject: Re: List Item renderer Click event finds a component in its way
Hi Yishay,
thanks for let me know about it. I'm playing with it but I didn't get to
work.
The case is that maybe List component is not ready for this yet
If event.currentTarget is not working, we need to make it work. That is the
recommended way to handle bubbling of events. The browsers and Flash work that
way so folks will expect it to work.
The List's change event is not a bubbling event. Only interaction events like
Mouse and Keyboard
Carlos,
I was just curious how it behave in that case. :) Definitely I'm not
suggesting that as a solution.
Thanks,
Piotr
On Mon, Jul 2, 2018, 11:44 PM Carlos Rovira wrote:
> Hi Yishay,
>
> thanks for let me know about it. I'm playing with it but I didn't get to
> work.
> The case is that
Hi Yishay,
thanks for let me know about it. I'm playing with it but I didn't get to
work.
The case is that maybe List component is not ready for this yet.
* event.currentTarget seems not exists in ItemRenderers
* I can use "itemClicked" event in a MXML List (I think is not set the
metadata and
Hi Piotr,
I just tried to disable both components but components are still
intercepting the click and calling the function so the error is generated.
But I think although this could work, not seems to me like a final
solution, since I don't think users should need to disable components in an
item
Take a look at ItemRendererMouseController.handleMouseUp() in Basic. It uses
currentTarget.
From: carlos.rov...@gmail.com on behalf of Carlos
Rovira
Sent: Monday, July 2, 2018 5:27:08 PM
To: dev@royale.apache.org
Subject: List Item renderer Click event
Hi Carlos,
What has happened if children (in that case your icon and Label), are
disabled ?
Thanks,
Piotr
pon., 2 lip 2018 o 16:27 Carlos Rovira napisaĆ(a):
> Hi,
>
> what's the best way to handle a click event in a List when the Item
> renderer has some components that can interfere in the
12 matches
Mail list logo