Location of stack
Mark Schonewille
m.schonewille at economy-x-talk.com
Mon May 17 08:45:14 EDT 2010
Hi Paul,
I just saw your question on the forum. I'll post the same answer there
and on this list.
The engine knows the actual height of the card only after loading all
windows, objects, libraries etc. This is easy to solve, by first
running all default startup messages (preOpenStack, openStack,
preOpenCard, openCard, openBackground etc.) and changing the window
size only afterwards. For example:
global gWindowRect
on preOpenStack
hide this stack
readPrefs // your handler to read prefs
send "setWindowSize" to me in 0 millisecs
pass preOpenStack
end preOpenStack
on setWindowSize
set the rect of this stack to gWindowRect
end setWindowSize
Instead of a handler that only sets the rect of the window, you could
also write a handler that does the complete initialisation of your
project. It is safe to assume that all necesary libraries are
available when the initialisation handler runs.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
Economy-x-Talk is always looking for new projects. Contact me for a
quote http://economy-x-talk.com/contact.html
Download Clipboard Link http://clipboardlink.economy-x-talk.com and
share the clipboard of your computer over the local network.
On 15 mei 2010, at 18:02, Paul D. DeRocco wrote:
> In my program, I write the location of my stack (among other things)
> to a
> text file on exit, and then read it and set the location on startup.
> This
> works correctly on Windows, but on the Mac, the window moves up by
> 12 pixels
> every time. This happens both when I run the .rev file or when I run
> my
> standalone. I use 'the location of stack "main"' to get and set the
> location. I'm using Rev 3.5. Is this a known bug?
>
> --
>
> Ciao, Paul D. DeRocco
> Paul mailto:pderocco at ix.netcom.com
More information about the use-livecode
mailing list