most efficient way to make a window visible

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
rozek
Posts: 151
Joined: Mon Jun 19, 2006 2:29 pm
Contact:

most efficient way to make a window visible

Post by rozek » Fri Jun 20, 2008 1:22 pm

Hello!

I'm currently developing a (library) stack which should automatically become visible, when it's contents have changed. Initially, it is invisible (not even open, just loaded by "start using"), and after becoming visible, the user may decide to hide it again (until the next change).

The stacks contents may change quite often (also when the stack has already been made visible, i.e., when making it visible once again is useless) - thus, what is the most efficient way to make the stack visible upon a change?

I'm currently using:

Code: Select all

  open (the long name of me); show me
because it might not have been opened or it might have been hidden by the user. Explicitly checking for these conditions might take longer than just opening and showing the stack directly.

Or should I open but hide the stack (i.e. window) in the "LibraryStack" handler already? This would only require

Code: Select all

show me
later...

What is the recommended approach?
Kind regards,

Andreas Rozek

Post Reply