HyperCard 2.0: MultiFinder and Hidden Windows (7/92)

HyperCard 1.2.x was set up to automatically hide the current stack when you switched out of HyperCard to another application (or the Finder) using MultiFinder. HyperCard 2.0 no longer does this. This can be distressing, especially to those with small screens and full-size stacks. The difficulty can be worse if there are multiple stacks open at once (multiple windows). Also, although some windows ARE automatically hidden by HyperCard 2.0, the Variable Watcher and Message Watcher are not (there may be others╔)

The following bit of HyperTalk remedies this situation.

When placed in the Home Stack Script (it needs to always be in the inheritance path) somewhere in an "on idle" handler, it will automatically detect the fact that HyperCard is not the current application and hide all the visible windows. When you return to HyperCard, all the windows will reappear.

Be sure to add the container (variable) named resumeStackList to the global list at the beginning of the "on idle" handler.

on idle
global resumeStackList

.
.
.

if the suspended then
if resumeStackList is empty then
put the windows into rSL
repeat with z=1 to the number of lines in rSL
if the visible of window (line z of rSL) then
put line z of rSL & return after resumeStackList
hide window (line z of rSL)
end if
end repeat
end if
else
if resumeStackList is not empty then
repeat with z=1 to the number of lines in resumeStackList
show window (line z of resumeStackList)
end repeat
put empty into resumeStackList
end if
end if
pass idle
end idle


This article is adapted from the Claris Tech Info database.

Support Information Services
Published Date: Feb 19, 2012