Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: AIR window positioning problem  (Read 10766 times)
krille
Newbie
*
Posts: 4


View Profile Email
« 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!
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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>
Logged
krille
Newbie
*
Posts: 4


View Profile Email
« Reply #2 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
Logged
Pages: [1]
Print