|
What you describe sounds like it should
work. If you suspect scoping issues, you are probably correct. Use delegate()
to make sure the handler function executing the viewstack.selectedIndex = n call
knows about the viewstack. From: Blake Kadatz
[mailto:[EMAIL PROTECTED] Hello, I've build a LoginWindow.mxml consisting of a
<mx:TitleWindow ...> tag and related code. I call this from my main
application as such: function show_login():Void So far so good. When the user wants to login, I call a
remote object with the username and password supplied by the
user which queries a database and passes the return value to a
loginResult function: function loginResult(result):Void And this works fine, but it seems like a hack. I originally
wanted to get this to work with events. I setup an event handler on the
"login" variable, the LoginWindow fires off an event if the login is
successful, and the application handles the event and switches to a different
panel in the stack. The problem is, this didn't work. I could
display an alert dialog, but the call to switch the stack didn't execute.
I assume this has something to do with how it's being references (eg: event
handlers are outside of the scope of the code in which they're created) but
after an hour of fiddling with broadcast handlers and various other mechanisms,
I couldn't seem to get main_stack to update. Is this the only way to do it, is the event model cleaner,
or is there a better methodology for displaying modal dialogs like a login screen?
Any pointers would be appreciated. Thanks, Blake
Yahoo! Groups Links
|
- RE: [flexcoders] Proper login window handling? Tracy Spratt
- RE: [flexcoders] Proper login window handling? Blake Kadatz
- RE: [flexcoders] Proper login window handling? Tracy Spratt
- RE: [flexcoders] Proper login window handling? Blake Kadatz

