In MetaCard, the openCard message is sent *before* the window is
redrawn (in fact, it is sent before the window is even mapped if the
stack is being opened for the first time). This was done to improve
performance by eliminating multiple redraws (each time you change a
control in an openCard handler an extra redraw occurs, and if you lock
and unlock the screen in the openCard handler *everything* gets drawn
twice). It also eliminates problems caused by the asynchronous nature
of X (forcing all of the redraws to be done before sending the message
slows things down, and makes event handling more complicated).
A few MetaCard users have also asked how they show a card for a second
or two and then bring up a dialog prompting for input. The current
solution involves setting a global counter in an openCard handler, and
then incrementing/decrementing it in an idle handler, which is more
complicated than just using "wait" in an openCard handler.
Options to consider:
1) do nothing.
2) change MetaCard to work like HyperCard (take the performance hit,
and let the user watch the updating of the card).
3) change MetaCard to work like HyperCard, but add a "preOpenCard"
message to support the old behavior.
4) add a "postOpenCard" message sent after all the redraws are done
(perhaps on the first idle message sent to the card), which would act
like openCard does in HyperCard.
What is your preference?
This may also be a problem with openStack, although we haven't seen
it yet. The same options should be considered.
Scott
-- *********************************************************************** * Scott Raney 303-447-3936 Remember: the better you look, * * raney@metacard.com the more you'll see -- Lidia * ***********************************************************************