-J,
I am still learning Flex, can you supply an example on the event way
you would do this so I can learn from it.  I learn better when I can
see some code.

Thanks for taking the time,
timgerr

--- In [email protected], "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> When you use the <mx:component> tag, it does some voodoo and creates a
> completely new class for you, extending whatever is the first child
(in your
> case, the new class would extend HBox).
> 
> This class has its own scope, so it doesn't have member access to
anything
> in the scope of your existing application.
> 
> There's a few options for you here:
> 
> 1) You can call Application.application.doThis(event) - this is
quick, but
> not so nice. Not how I'd do it. doThis() must be public or you'll get a
> run-time error
> 
> 2) You can do add a function to your custom component that
dispatches a new
> event, and listen to the event from your application, you just have
to put
> true, for "bubbles" when you instantiate your event. This is how I'd
do it.
> You can subclass Event, or just use a DynamicEvent if you want to
pass extra
> information up to the application-level handler.
> 
> And yes, I do have a hard-on for event-based programming. It's the
right way
> to do things in most cases :)
> 
> -J
> 


Reply via email to