Title: Message

In your code, you do not have “two mxml files”.  It does not matter where the code for a component comes from.  When the component gets instantiated, it is “in” the application, and you can reference the parent application as Manish suggests.

 

Be careful with binding.  While I am not sure about parentApplication or parentDocument references, I AM sure about the mx.core.Application.application style reference from within a component:  It will NOT reliably support binding, because of data typing issues.  If you need to bind to something in the application scope, post, and I’ll suggest some solutions.

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Parekh, Shweta - BLS CTR
Sent: Friday, October 14, 2005 1:49 PM
To: [email protected]
Subject: RE: [flexcoders] Problem with repeater and datagrid -- Please help!

 

So then two mxml files will be accessing the same actionscript. In one mxml, the member is set and the other mxml accesses the member. That might work for me. But can two mxml files access the same actionscript?

 

-Shweta

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Mink, Joseph
Sent: Friday, October 14, 2005 1:18 PM
To: [email protected]
Subject: RE: [flexcoders] Problem with repeater and datagrid -- Please help!

Or you can create a static actionscript class with a private member.  Set that member, and then everyone who accesses the static class will get the same value for that static member:

 

class StaticClass

{

  public static var theValue;

}

 

...

 

StaticClass.theValue = something;

 

...

 

if (StaticClass.theValue == something)

...

 

Does that help?

 


From: [email protected] [mailto:[email protected]] On Behalf Of Manish Jethani
Sent: Friday, October 14, 2005 12:27 PM
To: [email protected]
Subject: Re: [flexcoders] Problem with repeater and datagrid -- Please help!

On 10/14/05, Parekh, Shweta - BLS CTR <[EMAIL PROTECTED]> wrote:

> 1. Are there global variables in Flex so that I can take the result from
> remote call in a global variable and then use it anywhere -- in my case in
> the child component?

You can save the result in the application and then refer to it from
child components using the _expression_ "parentApplication.myResult"
(can even bind to it I guess).



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to