[flexcoders] Sending Form Data

2008-09-02 Thread Cordova Aaron
I create a script that can generate forms on the fly. I run into a snag when 
sending the data back. For instance if one of the fields being returned is an 
array.

example:
var returnMessage:Object = new Object.
returnMessage.formid = 123;
returnMessage.address = 345 W. FlexCoder Ave;
returnMessage.city = Las Vegas;


public var session:Array = new Array;
session.id = 123;
session.user = some_user;
session.time = the_time;

/* this is where things stop working */
returnMessage.session = session;


So If I need to return all my form fields along with some data that may be in 
an array, how do I go about that?



  



Re: [flexcoders] Sending Form Data

2008-09-02 Thread Sherif Abdou
What do you mean by it stops working? I tested it and it works. 
--
Sherif Abdou
http://VadexFX.com
http://Sherifabdou.com
  - Original Message - 
  From: Cordova Aaron 
  To: flexcoders@yahoogroups.com 
  Sent: Tuesday, September 02, 2008 4:54 PM
  Subject: [flexcoders] Sending Form Data


  I create a script that can generate forms on the fly. I run into a snag when 
sending the data back. For instance if one of the fields being returned is an 
array.

  example:
  var returnMessage:Object = new Object.
  returnMessage.formid = 123;
  returnMessage.address = 345 W. FlexCoder Ave;
  returnMessage.city = Las Vegas;

  public var session:Array = new Array;
  session.id = 123;
  session.user = some_user;
  session.time = the_time;

  /* this is where things stop working */
  returnMessage.session = session;

  So If I need to return all my form fields along with some data that may be in 
an array, how do I go about that?



   

Re: [flexcoders] Sending Form Data

2008-09-02 Thread Cordova Aaron
/*  this is where things stop working */
returnMessage. session =  session;

as in the object returnMessage at session now equates to the last element of 
the var 'session'.



- Original Message 
From: Sherif Abdou [EMAIL PROTECTED]
To: flexcoders@yahoogroups.com
Sent: Tuesday, September 2, 2008 3:16:24 PM
Subject: Re: [flexcoders] Sending Form Data


What do you mean by it stops working? I tested it 
and it works. 
--
Sherif Abdou
http://VadexFX. com
http://Sherifabdou. com
- Original Message - 
From: Cordova Aaron 
To: [EMAIL PROTECTED] ups.com 
Sent: Tuesday, September 02, 2008 4:54  PM
Subject: [flexcoders] Sending Form  Data

I create a script that can generate forms on the fly. I run into a snag  when 
sending the data back. For instance if one of the fields being returned  is an 
array.

example:
var returnMessage: Object = new  Object.
returnMessage. formid = 123;
returnMessage. address =  345 W. FlexCoder Ave;
returnMessage. city = Las  Vegas;

public var session:Array = new Array;
session.id =  123;
session.user = some_user;
session.time = the_time;

/*  this is where things stop working */
returnMessage. session =  session;

So If I need to return all my form fields along with some data  that may be in 
an array, how do I go about that?




  

[flexcoders] Sending form

2007-03-06 Thread RadicalByte
Hi All,

This is my first post to the group, and is probably a stupid question..

I'm building my first flex application.  It consists of the main
application area and several forms.

The main application area calls some web services via HTTPService and
stores the resulting data in ArrayCollections.

The froms are instantiated via Actionscript, and managed by the
PopupManager as they're popups.

Now for the questions:

1. How do I give the forms access to the application area's
ArrayCollections?  I'd ideally like to pass a reference in each form's
constructor.  If this is possible/easy then the next question isn't so
important [because I'll send my subform a reference to the variables
and it can work direct on them].

2. One of the forms is a data entry form.  It has an 'ok' button. 
OnClick of the OK button I need the form to send the values of its
member controls to the main application.  The main application then
uses these values.

3. Does anyone have any book recommendations?  I've nabbed O'Reilly's
ActionScript 3.0 Cookbook for answers to some questions, but I'd like
something that covers both Flex/ActionScript..

Thanks in advance :-)

Best regards,
Ryan



RE: [flexcoders] Sending form

2007-03-06 Thread Dimitrios Gianninas
Some answers:
 
1) Once u created the pop-up, just pass it the data it needs:
 
var win:MyPopUp = PopUpManager.create( ... );
win.myData = someArrayCollection;
 
2) Once the OK button is pressed, set the data to some global modal that will 
then be used by the main app (see Cairngorm for this as well):
 
public function doOk():void {
   ModelLocator.getInstance().someVar = myData;
   PopUpManager.removePopUp( this );
}
 
Dimitrios Gianninas
Developer
Optimal Payments Inc.
 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of 
RadicalByte
Sent: Tuesday, March 06, 2007 7:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Sending form



Hi All,

This is my first post to the group, and is probably a stupid question..

I'm building my first flex application. It consists of the main
application area and several forms.

The main application area calls some web services via HTTPService and
stores the resulting data in ArrayCollections.

The froms are instantiated via Actionscript, and managed by the
PopupManager as they're popups.

Now for the questions:

1. How do I give the forms access to the application area's
ArrayCollections? I'd ideally like to pass a reference in each form's
constructor. If this is possible/easy then the next question isn't so
important [because I'll send my subform a reference to the variables
and it can work direct on them].

2. One of the forms is a data entry form. It has an 'ok' button. 
OnClick of the OK button I need the form to send the values of its
member controls to the main application. The main application then
uses these values.

3. Does anyone have any book recommendations? I've nabbed O'Reilly's
ActionScript 3.0 Cookbook for answers to some questions, but I'd like
something that covers both Flex/ActionScript..

Thanks in advance :-)

Best regards,
Ryan



 

-- 
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.