You can also hang things off the
mx.core.Application.application static reference (which refers to the main
application mxml file).
Matt
From: JesterXL
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 08, 2005
11:15 AM
To: [EMAIL PROTECTED]
Subject: Re: [flexcoders]
dataProvider="{_global.blah}"
Use a static class variable.
Creation
----------
class Utilities
{
static public var
dataProvider:Array;
}
Use
------
import Utilities;
dataProvider="{Utilities.dataProvider}"
Not very good with tags, but I know that'll work
in ActionScript, so reckon
it'll work in a tag reference too.
Any MXML file can use the above, it just hasto do
the import Utilities;
statement to compile. Since it's static,
it's the same variable for all
MXML's and/or AS files that utilize it.
----- Original Message -----
From: "James Ward"
<[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, February 08, 2005 2:09 PM
Subject: [flexcoders]
dataProvider="{_global.blah}"
When I try to set a dataProvider to something in
the _global space, I
get:
Changes to unknown property, _global, will not be
detected.
Changes to unknown property, blah, will not be
detected.
I really need to put some objects in a
"global" area so that I don't
have to pass them around between different areas
of my application using
events.
Any ideas?
Thanks.
-James
Yahoo! Groups Links