PureMVC Architects Lounge

PureMVC Manifold => Standard Version => Topic started by: krille on October 18, 2008, 08:50:58



Title: AIR window positioning problem
Post by: krille on October 18, 2008, 08:50:58
Hi all,

I want to reposition my app on startup to the last saved window position. I used DesktopCitizen and looked at the source code, but I can't exactly figure out what is wrong.

My problem is, that when I call my RestoreWindowPositionCommand from StartUpCommand, the window seems to not be completely rendered, because nothing happens.
When I call RestoreWindowPositionCommand later on, everything works, but it's kind of ugly because the window "jumps" to the new location...

How can I achieve the same window positioning behaviour as with DesktopCitizen?

Thanks in advance!


Title: Re: AIR window positioning problem
Post by: puremvc on October 23, 2008, 05:11:57
Please examine the CodePeek and RSSHeadlines applications to see how it is used.

The jumping is because you need to make your window not visible to begin with. You make it visible after you've restored size and position.

-=Cliff>


Title: Re: AIR window positioning problem
Post by: krille on October 23, 2008, 11:56:39
Hi Cliff,

thanks for replying!
I found a workaround by hiding the app on startup and showing it later on via a Timer, if I did so
in the StartUpCommand it wouldn't work.
I will examine your examples to see what I did wrong.
 ::)

Thanks and regards!
krille