Page 1 of 1

most efficient way to make a window visible

Posted: Fri Jun 20, 2008 1:22 pm
by rozek
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?