It may not be best practice but create a public variable in your main
(WindowedApplication) file and then access it with
Application.application.myPublicVariable. This can be a custom object
if you need to have more data.


--- In flexcoders@yahoogroups.com, "bredwards358" <[EMAIL PROTECTED]>
wrote:
>
> In the application I'm currently developing, end users need to log in
> to utilize it. Also I need to keep track of who is logged in so that I
> can input that into a local database after certain actions. I've tried
> using a public variable in a commonly used class, however since an
> instance of that class is newly declared when a new window opens up
> the value is set back to null, making it unusable. I've heard of using
> an actionscript file inside a package used by the App containing the
> variables but since the examples I've seen have them as static and
> const variables and thus can't be changed from their default values.
> So my question is this, is it possible in AIR to pass the value of a
> variable from the native application window to another window component?
> 
> To help clear things up, essentially the user logs in and the username
> is set as the value of a variable declared someplace, then in another
> window, an action takes place, info is recorded in the database and
> the app looks up the username in the variable, and records it along
> with the other stuff in the db.
>


Reply via email to