I can't follow your description of what you're doing. Can you post code
for a very simple version of this component -- and an simple app that
uses it -- in which the click doesn't work?
- Gordon
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of jack_freud
Sent: Friday, February 16, 2007 7:24 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Getting a component to hear click
I was able to get it to work by adding a listener for click but I
don't understand why I had to do that.
Does anyone have a suggestion as to what was going on?
Thanks,
Jack
--- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
, jack_freud [EMAIL PROTECTED] wrote:
I'm still pretty new to making components. Basically this one is
like
an image that navigates to a URL in HTML-land, except that I want to
make it so you can set its text and URL as properties of the
component. Seems to be utterly simple.
But I can't get it to hear the click event...
It extends VBox and contains a label. It has a member variable of a
URL and a click event so that clicking on the box (or the label)
should navigate to that url.
click does not show up in the auto-complete, but I get no errors
when I implement it, and I see click there in the class hierarchy.
But nothing happens. Breakpoints don't stop, nothing happens.
What's got me puzzled is that in the mxml where I used this
component,
if I put code for the click event, it works flawlessly. Of course I
could leave it there in the app, but naturally I'd prefer to
encapsulate it so it has its own data and behaviors like any good
little object.
Is there something obvious I don't know?
Thanks,
Jack