[flexcoders] can you get a command result in Cairngorm call a function on the calling page?
OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence is still off. Thanks, D
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu From: Darrin Kay dar...@stop-ing.com To: flexcoders@yahoogroups.com Sent: Tue, November 3, 2009 10:18:51 AM Subject: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence is still off. Thanks, D
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_bran...@yahoo.comwrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu -- *From:* Darrin Kay dar...@stop-ing.com *To:* flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:18:51 AM *Subject:* [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence is still off. Thanks, D
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
I have no idea what your architecture is, but if you use Cairngorm which I gather you do since you mentioned in the title you can still do some more or less dirty tircks in there. Put something in your model a boolean flag along with the data you want in your view. In the view bind the boolean data and execute a function (your function) when the bindings tirggers... when the data comes back from the server you just do boolFlah = !boolFlag and it fires your triggers... Dirty but it will do it ... C From: Darrin Kay dar...@stop-ing.com To: flexcoders@yahoogroups.com Sent: Tue, November 3, 2009 10:29:34 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_braniak@ yahoo.com wrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 10:18:51 AM Subject: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence is still off. Thanks, D
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
is there a way to make the make the app wait until the complete sequence is complete before I call the next function? So I call a function but when I dispatch the event, I wait to stop there until the cmd result is complete On Tue, Nov 3, 2009 at 8:35 AM, claudiu ursica the_bran...@yahoo.comwrote: I have no idea what your architecture is, but if you use Cairngorm which I gather you do since you mentioned in the title you can still do some more or less dirty tircks in there. Put something in your model a boolean flag along with the data you want in your view. In the view bind the boolean data and execute a function (your function) when the bindings tirggers... when the data comes back from the server you just do boolFlah = !boolFlag and it fires your triggers... Dirty but it will do it ... C -- *From:* Darrin Kay dar...@stop-ing.com *To:* flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:29:34 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:18:51 AM *Subject:* [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence is still off. Thanks, D
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
a addEventListner would be the best but not sure how to add it to the result of the cmd file and have it kick off a function in the view page On Tue, Nov 3, 2009 at 8:35 AM, claudiu ursica the_bran...@yahoo.comwrote: I have no idea what your architecture is, but if you use Cairngorm which I gather you do since you mentioned in the title you can still do some more or less dirty tircks in there. Put something in your model a boolean flag along with the data you want in your view. In the view bind the boolean data and execute a function (your function) when the bindings tirggers... when the data comes back from the server you just do boolFlah = !boolFlag and it fires your triggers... Dirty but it will do it ... C -- *From:* Darrin Kay dar...@stop-ing.com *To:* flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:29:34 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:18:51 AM *Subject:* [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence is still off. Thanks, D
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
You have a model right ? you can aceess the model inside the command and also inside the view. In the view you can addEvt... on the modelInstance.propertyYouwantToListen (model class extend eventDispatcher or implements IEventDispatcher for this) update the model when in the command, view litens for the model and you call the function. TH From: Darrin Kay dar...@stop-ing.com To: flexcoders@yahoogroups.com Sent: Tue, November 3, 2009 11:02:40 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? a addEventListner would be the best but not sure how to add it to the result of the cmd file and have it kick off a function in the view page On Tue, Nov 3, 2009 at 8:35 AM, claudiu ursica the_braniak@ yahoo.com wrote: I have no idea what your architecture is, but if you use Cairngorm which I gather you do since you mentioned in the title you can still do some more or less dirty tircks in there. Put something in your model a boolean flag along with the data you want in your view. In the view bind the boolean data and execute a function (your function) when the bindings tirggers... when the data comes back from the server you just do boolFlah = !boolFlag and it fires your triggers... Dirty but it will do it ... C From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 10:29:34 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_braniak@ yahoo.com wrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 10:18:51 AM Subject: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence is still off. Thanks, D
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
so it would be like this : model.varName.addEventListner(change, function); Sorry I have not use that yet, thanks On Tue, Nov 3, 2009 at 9:07 AM, claudiu ursica the_bran...@yahoo.comwrote: You have a model right ? you can aceess the model inside the command and also inside the view. In the view you can addEvt... on the modelInstance.propertyYouwantToListen (model class extend eventDispatcher or implements IEventDispatcher for this) update the model when in the command, view litens for the model and you call the function. TH -- *From:* Darrin Kay dar...@stop-ing.com *To:* flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 11:02:40 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? a addEventListner would be the best but not sure how to add it to the result of the cmd file and have it kick off a function in the view page On Tue, Nov 3, 2009 at 8:35 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: I have no idea what your architecture is, but if you use Cairngorm which I gather you do since you mentioned in the title you can still do some more or less dirty tircks in there. Put something in your model a boolean flag along with the data you want in your view. In the view bind the boolean data and execute a function (your function) when the bindings tirggers... when the data comes back from the server you just do boolFlah = !boolFlag and it fires your triggers... Dirty but it will do it ... C -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:29:34 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:18:51 AM *Subject:* [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence is still off. Thanks, D
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
something like that in the view model.varName. addEventListner( change, function); , however in your model setter you do something like private var _whateverName:WhateverType; public var set varName(val:WhateverType):void { if (val != _whateverName) { _whateverName = val; dispatchEvent(change); } } again class extend EventDispatcher ... C From: Darrin Kay dar...@stop-ing.com To: flexcoders@yahoogroups.com Sent: Tue, November 3, 2009 11:15:11 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? so it would be like this : model.varName. addEventListner( change, function); Sorry I have not use that yet, thanks On Tue, Nov 3, 2009 at 9:07 AM, claudiu ursica the_braniak@ yahoo.com wrote: You have a model right ? you can aceess the model inside the command and also inside the view. In the view you can addEvt... on the modelInstance. propertyYouwantT oListen (model class extend eventDispatcher or implements IEventDispatcher for this) update the model when in the command, view litens for the model and you call the function. TH From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 11:02:40 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? a addEventListner would be the best but not sure how to add it to the result of the cmd file and have it kick off a function in the view page On Tue, Nov 3, 2009 at 8:35 AM, claudiu ursica the_braniak@ yahoo.com wrote: I have no idea what your architecture is, but if you use Cairngorm which I gather you do since you mentioned in the title you can still do some more or less dirty tircks in there. Put something in your model a boolean flag along with the data you want in your view. In the view bind the boolean data and execute a function (your function) when the bindings tirggers... when the data comes back from the server you just do boolFlah = !boolFlag and it fires your triggers... Dirty but it will do it ... C From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 10:29:34 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_braniak@ yahoo.com wrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 10:18:51 AM Subject: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence is still off. Thanks, D
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
so wout the setter just go in the model file? if so any place under the variable definition? On Tue, Nov 3, 2009 at 9:22 AM, claudiu ursica the_bran...@yahoo.comwrote: something like that in the view model.varName. addEventListner( change, function); , however in your model setter you do something like private var _whateverName:WhateverType; public var set varName(val:WhateverType):void { if (val != _whateverName) { _whateverName = val; dispatchEvent(change); } } again class extend EventDispatcher ... C -- *From:* Darrin Kay dar...@stop-ing.com *To:* flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 11:15:11 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? so it would be like this : model.varName. addEventListner( change, function); Sorry I have not use that yet, thanks On Tue, Nov 3, 2009 at 9:07 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: You have a model right ? you can aceess the model inside the command and also inside the view. In the view you can addEvt... on the modelInstance. propertyYouwantT oListen (model class extend eventDispatcher or implements IEventDispatcher for this) update the model when in the command, view litens for the model and you call the function. TH -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 11:02:40 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? a addEventListner would be the best but not sure how to add it to the result of the cmd file and have it kick off a function in the view page On Tue, Nov 3, 2009 at 8:35 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: I have no idea what your architecture is, but if you use Cairngorm which I gather you do since you mentioned in the title you can still do some more or less dirty tircks in there. Put something in your model a boolean flag along with the data you want in your view. In the view bind the boolean data and execute a function (your function) when the bindings tirggers... when the data comes back from the server you just do boolFlah = !boolFlag and it fires your triggers... Dirty but it will do it ... C -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:29:34 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:18:51 AM *Subject:* [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence is still off. Thanks, D
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
Either in your public class ModelName implements IModelLocator or inside some other class which is part of you model... Again I don't know your architecture... Are you developing this on your own? C From: Darrin Kay dar...@stop-ing.com To: flexcoders@yahoogroups.com Sent: Tue, November 3, 2009 11:33:30 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? so wout the setter just go in the model file? if so any place under the variable definition? On Tue, Nov 3, 2009 at 9:22 AM, claudiu ursica the_braniak@ yahoo.com wrote: something like that in the view model.varName. addEventListner( change, function); , however in your model setter you do something like private var _whateverName: WhateverType; public var set varName(val: WhateverType) :void { if (val != _whateverName) { _whateverName = val; dispatchEvent(change); } } again class extend EventDispatcher ... C From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 11:15:11 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? so it would be like this : model.varName. addEventListner( change, function); Sorry I have not use that yet, thanks On Tue, Nov 3, 2009 at 9:07 AM, claudiu ursica the_braniak@ yahoo.com wrote: You have a model right ? you can aceess the model inside the command and also inside the view. In the view you can addEvt... on the modelInstance. propertyYouwantT oListen (model class extend eventDispatcher or implements IEventDispatcher for this) update the model when in the command, view litens for the model and you call the function. TH From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 11:02:40 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? a addEventListner would be the best but not sure how to add it to the result of the cmd file and have it kick off a function in the view page On Tue, Nov 3, 2009 at 8:35 AM, claudiu ursica the_braniak@ yahoo.com wrote: I have no idea what your architecture is, but if you use Cairngorm which I gather you do since you mentioned in the title you can still do some more or less dirty tircks in there. Put something in your model a boolean flag along with the data you want in your view. In the view bind the boolean data and execute a function (your function) when the bindings tirggers... when the data comes back from the server you just do boolFlah = !boolFlag and it fires your triggers... Dirty but it will do it ... C From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 10:29:34 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_braniak@ yahoo.com wrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 10:18:51 AM Subject: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence is still off. Thanks, D
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
yes, I got it in there but now it is telling me dispatchEvent(change) can not be a string, should be type flash.event:Event I have this in the ModelLocator.as: public function set varName(val:Number):void{ if(val !=areaID){ areaID = val; dispatchEvent(change); } } on the view page, in the init function I added model.areaID.addEventListner(change, setList); Thanks for all of your help Darrin On Tue, Nov 3, 2009 at 9:40 AM, claudiu ursica the_bran...@yahoo.comwrote: Either in your public class ModelName implements IModelLocator or inside some other class which is part of you model... Again I don't know your architecture... Are you developing this on your own? C -- *From:* Darrin Kay dar...@stop-ing.com *To:* flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 11:33:30 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? so wout the setter just go in the model file? if so any place under the variable definition? On Tue, Nov 3, 2009 at 9:22 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: something like that in the view model.varName. addEventListner( change, function); , however in your model setter you do something like private var _whateverName: WhateverType; public var set varName(val: WhateverType) :void { if (val != _whateverName) { _whateverName = val; dispatchEvent(change); } } again class extend EventDispatcher ... C -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 11:15:11 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? so it would be like this : model.varName. addEventListner( change, function); Sorry I have not use that yet, thanks On Tue, Nov 3, 2009 at 9:07 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: You have a model right ? you can aceess the model inside the command and also inside the view. In the view you can addEvt... on the modelInstance. propertyYouwantT oListen (model class extend eventDispatcher or implements IEventDispatcher for this) update the model when in the command, view litens for the model and you call the function. TH -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 11:02:40 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? a addEventListner would be the best but not sure how to add it to the result of the cmd file and have it kick off a function in the view page On Tue, Nov 3, 2009 at 8:35 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: I have no idea what your architecture is, but if you use Cairngorm which I gather you do since you mentioned in the title you can still do some more or less dirty tircks in there. Put something in your model a boolean flag along with the data you want in your view. In the view bind the boolean data and execute a function (your function) when the bindings tirggers... when the data comes back from the server you just do boolFlah = !boolFlag and it fires your triggers... Dirty but it will do it ... C -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:29:34 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:18:51 AM *Subject:* [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Is there a way to do this? I tried a addEventListener on the submit button, but the sequence
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
Because you need to dispatchEvent(new Event(change)); You need to do some RTFM :) before posting stuff like this... C From: Darrin Kay dar...@stop-ing.com To: flexcoders@yahoogroups.com Sent: Tue, November 3, 2009 11:49:29 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? yes, I got it in there but now it is telling me dispatchEvent(change) can not be a string, should be type flash.event: Event I have this in the ModelLocator. as: public function set varName(val: Number):void{ if(val !=areaID){ areaID = val; dispatchEvent(change); } } on the view page, in the init function I added model.areaID. addEventListner(change, setList); Thanks for all of your help Darrin On Tue, Nov 3, 2009 at 9:40 AM, claudiu ursica the_braniak@ yahoo.com wrote: Either in your public class ModelName implements IModelLocator or inside some other class which is part of you model... Again I don't know your architecture. .. Are you developing this on your own? C From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 11:33:30 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? so wout the setter just go in the model file? if so any place under the variable definition? On Tue, Nov 3, 2009 at 9:22 AM, claudiu ursica the_braniak@ yahoo.com wrote: something like that in the view model.varName. addEventListner( change, function); , however in your model setter you do something like private var _whateverName: WhateverType; public var set varName(val: WhateverType) :void { if (val != _whateverName) { _whateverName = val; dispatchEvent(change); } } again class extend EventDispatcher ... C From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 11:15:11 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? so it would be like this : model.varName. addEventListner( change, function); Sorry I have not use that yet, thanks On Tue, Nov 3, 2009 at 9:07 AM, claudiu ursica the_braniak@ yahoo.com wrote: You have a model right ? you can aceess the model inside the command and also inside the view. In the view you can addEvt... on the modelInstance. propertyYouwantT oListen (model class extend eventDispatcher or implements IEventDispatcher for this) update the model when in the command, view litens for the model and you call the function. TH From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 11:02:40 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? a addEventListner would be the best but not sure how to add it to the result of the cmd file and have it kick off a function in the view page On Tue, Nov 3, 2009 at 8:35 AM, claudiu ursica the_braniak@ yahoo.com wrote: I have no idea what your architecture is, but if you use Cairngorm which I gather you do since you mentioned in the title you can still do some more or less dirty tircks in there. Put something in your model a boolean flag along with the data you want in your view. In the view bind the boolean data and execute a function (your function) when the bindings tirggers... when the data comes back from the server you just do boolFlah = !boolFlag and it fires your triggers... Dirty but it will do it ... C From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 10:29:34 AM Subject: Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_braniak@ yahoo.com wrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this... However is doable and probably withhout the cairngorm extentsions ... HTH, Claudiu From: Darrin Kay dar...@stop- ing.com To: flexcod...@yahoogro ups.com Sent: Tue, November 3, 2009 10:18:51 AM Subject: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
Thanks for your help, I got it, was just a few things that needed to be done. Thanks for the help On Tue, Nov 3, 2009 at 11:42 AM, claudiu ursica the_bran...@yahoo.comwrote: Because you need to dispatchEvent(new Event(change)); You need to do some RTFM :) before posting stuff like this... C -- *From:* Darrin Kay dar...@stop-ing.com *To:* flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 11:49:29 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? yes, I got it in there but now it is telling me dispatchEvent(change) can not be a string, should be type flash.event: Event I have this in the ModelLocator. as: public function set varName(val: Number):void{ if(val !=areaID){ areaID = val; dispatchEvent(change); } } on the view page, in the init function I added model.areaID. addEventListner(change, setList); Thanks for all of your help Darrin On Tue, Nov 3, 2009 at 9:40 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: Either in your public class ModelName implements IModelLocator or inside some other class which is part of you model... Again I don't know your architecture. .. Are you developing this on your own? C -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 11:33:30 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? so wout the setter just go in the model file? if so any place under the variable definition? On Tue, Nov 3, 2009 at 9:22 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: something like that in the view model.varName. addEventListner( change, function); , however in your model setter you do something like private var _whateverName: WhateverType; public var set varName(val: WhateverType) :void { if (val != _whateverName) { _whateverName = val; dispatchEvent(change); } } again class extend EventDispatcher ... C -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 11:15:11 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? so it would be like this : model.varName. addEventListner( change, function); Sorry I have not use that yet, thanks On Tue, Nov 3, 2009 at 9:07 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: You have a model right ? you can aceess the model inside the command and also inside the view. In the view you can addEvt... on the modelInstance. propertyYouwantT oListen (model class extend eventDispatcher or implements IEventDispatcher for this) update the model when in the command, view litens for the model and you call the function. TH -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 11:02:40 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? a addEventListner would be the best but not sure how to add it to the result of the cmd file and have it kick off a function in the view page On Tue, Nov 3, 2009 at 8:35 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: I have no idea what your architecture is, but if you use Cairngorm which I gather you do since you mentioned in the title you can still do some more or less dirty tircks in there. Put something in your model a boolean flag along with the data you want in your view. In the view bind the boolean data and execute a function (your function) when the bindings tirggers... when the data comes back from the server you just do boolFlah = !boolFlag and it fires your triggers... Dirty but it will do it ... C -- *From:* Darrin Kay dar...@stop- ing.com dar...@stop-ing.com *To:* flexcod...@yahoogro ups.com flexcoders@yahoogroups.com *Sent:* Tue, November 3, 2009 10:29:34 AM *Subject:* Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page? I can not add any 3rd party tools to the app. can you think of any another way? On Tue, Nov 3, 2009 at 8:23 AM, claudiu ursica the_braniak@ yahoo.comthe_bran...@yahoo.com wrote: You can attach an IResponder (with the result and fault functions) from your view as payload to your event. Inside your command you'll get the response/faul from the server and call the appropriate function on the IResponder reference. Check for UniversalMind cairngorm extension they explain this...
Re: [flexcoders] can you get a command result in Cairngorm call a function on the calling page?
On Tuesday 03 Nov 2009, Darrin Kay wrote: OK I have a sequence issue, I have a page that calls an event, which goes all the way to a cf page and the DB, on the Result I need to have a function on the page get called. Either have the page use ChangeWatcher to observe the model, or pass 'this' in as a parameter on the event, save the event object in the command to a private variable before invoking the server, and then reference savedEvent.callingView.yourFunc() in the result handler. I think ChangeWatcher is cleaner. -- Helping to continually disseminate guinine granular integrated distributed data as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.