RE: [flexcoders] Re: Cairngorm - Question on using ResultHandler

2007-01-29 Thread Dimitrios Gianninas
Well if your remote call is returning an object, then u do event.result ... if 
its returning a list of objects and u need to access the first, second, etc.. 
element then do event.result[0]. If its a map, then do event.result[keyname]
 
Dimitrios Gianninas
RIA Developer
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
malik_robinson
Sent: Sunday, January 28, 2007 9:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Cairngorm - Question on using ResultHandler



Hi,

Thanks for the help.  That worked and it called the next command which is 
what I wanted.  

In my result handler in the command that gets called next this works:

public function result( data:Object ):void {
var event:ResultEvent = data as ResultEvent
model.employeeList = event.result[0];
}

This does NOT work:

I am just trying to find out why, and if the above is how most do this.

public function result( data:Object ):void {
 var event:ResultEvent = data as ResultEvent
model.employeeList = event.result
}

Thanks,

-M


--- In flexcoders@yahoogroups.com, Dimitrios Gianninas [EMAIL PROTECTED] 
wrote:

 You are doing things the right way. If after you login you want to do some 
 more, look at the SequenceCommand.
 
 You would basically add a executeNextCommand() statement after your 
 model.workflowState statement.
 
 Dimitrios Gianninas
 RIA Developer
 Optimal Payments Inc.
 
 
 
 
 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
 malik_robinson
 Sent: Sunday, January 28, 2007 1:49 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Cairngorm - Question on using ResultHandler
 
 
 
 Hi,
 
 I have a question using Cairngorm and Commands. I am new to it but its making 
 more sense to me each day at least it seems that way.
 
 I have the following in my LoginCommand.as
 
 public function result( data:Object ):void {
 var event:ResultEvent = data as ResultEvent;
 
 if (event.result.length  0) {
 model.workflowState = ModelLocator.VIEWING_HOMEPAGE;
 }
 else {
 model.login.statusMsg = Your login credentials are invalid, please try 
 again.;
 }
 }
 
 1. Is there anything wrong with the way I am doing the above?
 2. I would like to call some other remote objects s! o I can populate some 
 datagrids after the user has been authenticated and then load the home page 
 of the app as I am doing above.
 
 
 
 
 -- 
 WARNING
 ---
 This electronic message and its attachments may contain confidential, 
 proprietary or legally privileged information, which is solely for the use of 
 the intended recipient. No privilege or other rights are waived by any 
 unintended transmission or unauthorized retransmission of this message. If 
 you are not the intended recipient of this message, or if you have received 
 it in error, you should immediately stop reading this message and delete it 
 and all attachments from your system. The reading, distribution, copying or 
 other use of this message or its attachments by unintended recipients is 
 unauthorized and may be unlawful. If you have received this e-mail in error, 
 please notify the sender.
 
 AVIS IMPORTANT
 --
 Ce message électronique et ses pièces jointes peuvent contenir des 
 renseignements confidentiels, exclusifs ou légalement privilégiés destinés au 
 seul usage du destinataire visé. L'expéditeur original ne renonce à aucun 
 privilège ou à aucun autre droit si le présent message a été transmis 
 involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes 
 pas le destinataire visé du présent message ou si vous l'avez reçu par 
 erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que 
 toutes ses pièces jointes, de votre système. La lecture, la distribution, la 
 copie ou tout autre usage du présent message ou de ses pièces jointes par des 
 personnes autres que le destinataire visé ne sont pas autorisés et pourraient 
 être illégaux. Si vous avez reçu ce courrier électronique par erreur, 
 veuillez en aviser l'expéditeur.



 


[flexcoders] Re: Cairngorm - Question on using ResultHandler

2007-01-29 Thread malik_robinson
Thanks!

-Malik

--- In flexcoders@yahoogroups.com, Dimitrios Gianninas 
[EMAIL PROTECTED] wrote:

 Well if your remote call is returning an object, then u do 
event.result ... if its returning a list of objects and u need to 
access the first, second, etc.. element then do event.result[0]. If 
its a map, then do event.result[keyname]
  
 Dimitrios Gianninas
 RIA Developer
 Optimal Payments Inc.
  
 
 
 
 From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of malik_robinson
 Sent: Sunday, January 28, 2007 9:11 PM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Re: Cairngorm - Question on using 
ResultHandler
 
 
 
 Hi,
 
 Thanks for the help.  That worked and it called the next command 
which is what I wanted.  
 
 In my result handler in the command that gets called next this 
works:
 
 public function result( data:Object ):void {
 var event:ResultEvent = data as ResultEvent
 model.employeeList = event.result[0];
 }
 
 This does NOT work:
 
 I am just trying to find out why, and if the above is how most do 
this.
 
 public function result( data:Object ):void {
  var event:ResultEvent = data as ResultEvent
 model.employeeList = event.result
 }
 
 Thanks,
 
 -M
 
 
 --- In flexcoders@yahoogroups.com, Dimitrios Gianninas 
dimitrios.gianninas@ wrote:
 
  You are doing things the right way. If after you login you want 
to do some more, look at the SequenceCommand.
  
  You would basically add a executeNextCommand() statement after 
your model.workflowState statement.
  
  Dimitrios Gianninas
  RIA Developer
  Optimal Payments Inc.
  
  
  
  
  From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of malik_robinson
  Sent: Sunday, January 28, 2007 1:49 AM
  To: flexcoders@yahoogroups.com
  Subject: [flexcoders] Cairngorm - Question on using ResultHandler
  
  
  
  Hi,
  
  I have a question using Cairngorm and Commands. I am new to it 
but its making more sense to me each day at least it seems that way.
  
  I have the following in my LoginCommand.as
  
  public function result( data:Object ):void {
  var event:ResultEvent = data as ResultEvent;
  
  if (event.result.length  0) {
  model.workflowState = ModelLocator.VIEWING_HOMEPAGE;
  }
  else {
  model.login.statusMsg = Your login credentials are invalid, 
please try again.;
  }
  }
  
  1. Is there anything wrong with the way I am doing the above?
  2. I would like to call some other remote objects s! o I can 
populate some datagrids after the user has been authenticated and 
then load the home page of the app as I am doing above.
  
  
  
  
  -- 
  WARNING
  ---
  This electronic message and its attachments may contain 
confidential, proprietary or legally privileged information, which 
is solely for the use of the intended recipient. No privilege or 
other rights are waived by any unintended transmission or 
unauthorized retransmission of this message. If you are not the 
intended recipient of this message, or if you have received it in 
error, you should immediately stop reading this message and delete 
it and all attachments from your system. The reading, distribution, 
copying or other use of this message or its attachments by 
unintended recipients is unauthorized and may be unlawful. If you 
have received this e-mail in error, please notify the sender.
  
  AVIS IMPORTANT
  --
  Ce message électronique et ses pièces jointes peuvent contenir 
des renseignements confidentiels, exclusifs ou légalement 
privilégiés destinés au seul usage du destinataire visé. 
L'expéditeur original ne renonce à aucun privilège ou à aucun autre 
droit si le présent message a été transmis involontairement ou s'il 
est retransmis sans son autorisation. Si vous n'êtes pas le 
destinataire visé du présent message ou si vous l'avez reçu par 
erreur, veuillez cesser immédiatement de le lire et le supprimer, 
ainsi que toutes ses pièces jointes, de votre système. La lecture, 
la distribution, la copie ou tout autre usage du présent message ou 
de ses pièces jointes par des personnes autres que le destinataire 
visé ne sont pas autorisés et pourraient être illégaux. Si vous avez 
reçu ce courrier électronique par erreur, veuillez en aviser 
l'expéditeur.
 





[flexcoders] Re: Cairngorm - Question on using ResultHandler

2007-01-28 Thread malik_robinson

Hi,

Thanks for the help.  That worked and it called the next command which
is what I wanted.

In my result handler in the command that gets called next this works:

public function result( data:Object ):void {
 var event:ResultEvent = data as ResultEvent
 model.employeeList = event.result[0];
}

This does NOT work:

I am just trying to find out why, and if the above is how most do this.

public function result( data:Object ):void {
  var event:ResultEvent = data as ResultEvent
 model.employeeList = event.result
}

Thanks,

-M


--- In flexcoders@yahoogroups.com, Dimitrios Gianninas
[EMAIL PROTECTED] wrote:

 You are doing things the right way. If after you login you want to do
some more, look at the SequenceCommand.

 You would basically add a executeNextCommand() statement after your
model.workflowState statement.

 Dimitrios Gianninas
 RIA Developer
 Optimal Payments Inc.


 

 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of malik_robinson
 Sent: Sunday, January 28, 2007 1:49 AM
 To: flexcoders@yahoogroups.com
 Subject: [flexcoders] Cairngorm - Question on using ResultHandler



 Hi,

 I have a question using Cairngorm and Commands. I am new to it but its
making more sense to me each day at least it seems that way.

 I have the following in my LoginCommand.as

 public function result( data:Object ):void {
 var event:ResultEvent = data as ResultEvent;

 if (event.result.length  0) {
 model.workflowState = ModelLocator.VIEWING_HOMEPAGE;
 }
 else {
 model.login.statusMsg = Your login credentials are invalid, please
try again.;
 }
 }

 1. Is there anything wrong with the way I am doing the above?
 2. I would like to call some other remote objects s! o I can populate
some datagrids after the user has been authenticated and then load the
home page of the app as I am doing above.




 --
 WARNING
 ---
 This electronic message and its attachments may contain confidential,
proprietary or legally privileged information, which is solely for the
use of the intended recipient. No privilege or other rights are waived
by any unintended transmission or unauthorized retransmission of this
message. If you are not the intended recipient of this message, or if
you have received it in error, you should immediately stop reading this
message and delete it and all attachments from your system. The reading,
distribution, copying or other use of this message or its attachments by
unintended recipients is unauthorized and may be unlawful. If you have
received this e-mail in error, please notify the sender.

 AVIS IMPORTANT
 --
 Ce message électronique et ses pièces jointes peuvent contenir
des renseignements confidentiels, exclusifs ou légalement
privilégiés destinés au seul usage du destinataire visé.
L'expéditeur original ne renonce à aucun privilège ou à
aucun autre droit si le présent message a été transmis
involontairement ou s'il est retransmis sans son autorisation. Si vous
n'êtes pas le destinataire visé du présent message ou si vous
l'avez reçu par erreur, veuillez cesser immédiatement de le lire
et le supprimer, ainsi que toutes ses pièces jointes, de votre
système. La lecture, la distribution, la copie ou tout autre usage du
présent message ou de ses pièces jointes par des personnes autres
que le destinataire visé ne sont pas autorisés et pourraient
être illégaux. Si vous avez reçu ce courrier électronique
par erreur, veuillez en aviser l'expéditeur.