This happens because stacks cannot be compacted when the "start using"
command is in use.
Here's a typical script showing a user-defined message inheritance path:
On OpenStack
start using stack "XYZ"
end OpenStack
Now, here's a typical script for compacting stacks:
On Mouseup
doMenu "Compact Stack"
end Mouseup
The compact stack script won't work, because the resources of stack "XYZ"
are also in use as well.
Here's a "compact stack" handler that does work, and makes the
user-definable mess academic:
On Mouseup
stop using stack "XYZ"
doMenu "Compact Stack"
start using stack "XYZ"
end Mouseup
Here's a "bells and whistles" stack from Claris' "Tech Support Navigator"
stack series, which pops text into the message box informing the user
what's going on:
on mouseUp
repeat 2
set cursor to busy
end repeat
stop using stack "XYZ"
put "Now compacting your Stack..."
repeat 17
put " " before msg
end repeat
doMenu "Compact Stack"
wait 90
repeat 40
put " " before msg
end repeat
wait 30
put "Compacting of your Stack was successful..."
repeat 12
put " " before msg
end repeat
wait 2 seconds
repeat 60
put " " before msg
end repeat
hide msg
end mouseUp
This article is adapted from the Claris Tech Info database.