Thanks, Tracy.

 

sj

 

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Monday, March 23, 2009 8:38 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} RE: [flexcoders] Re: watching and triggering events

 

Yes.

 

Tracy Spratt,

Lariat Services, development services available

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Scott
Sent: Monday, March 23, 2009 4:50 PM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re: watching and triggering events

 

Are you talking about setting up a singleton to handle events for
models?

 

 Scott

 

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tracy Spratt
Sent: Monday, March 23, 2009 3:23 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} RE: [flexcoders] Re: watching and triggering events

 

Easier, but I would not wait too long to start using an event model.

 

In response to your other question, forget my re-dispatch suggestion.
Use a data model or call the function directly.

 

Tracy Spratt,

Lariat Services, development services available

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Scott
Sent: Monday, March 23, 2009 2:33 PM
To: flexcoders@yahoogroups.com
Subject: RE:[flexcoders] Re: watching and triggering events

 

DOH. Ok, that is a LOT easier than what I was trying to do!  I think
it's time for a break. =O

 

Thanks!

 

________________________________

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of Tim Hoff
Sent: Monday, March 23, 2009 1:39 PM
To: flexcoders@yahoogroups.com
Subject: {Disarmed} [flexcoders] Re: watching and triggering events

 


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 flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
, "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: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
]
On
> Behalf Of Scott
> Sent: Monday, March 23, 2009 12:29 PM
> To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> 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!
>


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is

believed to be clean. 


-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is

believed to be clean. 




-- 
This message has been scanned for viruses and 
dangerous content by MailScanner <http://www.mailscanner.info/> , and is

believed to be clean. 

Reply via email to