I agree with Tracy; using an MVC architecture handles this nicely.  For
a simpler approach, make the method in ListAndShow public; and call it
from the parent; when the event is heard.

-TH

--- In [email protected], "Tracy Spratt" <tspr...@...> wrote:
>
> Have the parent re-dispatch the event and listen for it in
"listAndshow"
>
>
>
> One way to handle issues like this it to have a central bindable data
model.
> A 'singleton" is often used for this. Any component anywhere in the
app
> that needs to react when some data value changes can listen to the
model,
> either by binding for simple values, or by using a changeWatcher if
some
> action needs to occur.
>
>
>
> The data service call result handler (which can be in the model) will
set
> the appropriate model property, and the child components will respond.
>
>
>
>
>
> Tracy Spratt,
>
> Lariat Services, development services available
>
> _____
>
> From: [email protected] [mailto:[email protected]]
On
> Behalf Of Scott
> Sent: Monday, March 23, 2009 12:29 PM
> To: [email protected]
> Subject: [flexcoders] watching and triggering events
>
>
>
>
> I think I'm making this more difficult than it should be; or at least
I hope
> I am...
>
> I've got a parent viewer called AddContactandReminder.mxml and that
has two
> child objects, AddContact.mxml and ListAndShowContacts.mxml.
>
> When I add a new contact in the contact object I trigger an event
> evtAddedNewContact which is watched in the parent object and triggers
the
> AddContact window to close. I also want it to trigger the
> ListAndShowContacts.mxml to reload the contacts from the server and
display
> the new list. However, since it's another child object at the same
level as
> the AddContact.mxml I can't see the evtAddedNewContact fire.
>
> Is there an easy way to watch this event from ListAndShowContacts?
>
> Thanks!
>



Reply via email to