Hi list
With applications I've written in xcode 1.5 and panther I used the
next handler
on activate theObject
show window "main"
end activate
This results in almost the same as every Mac OS 10.3.x application.
When you closed window "main" then you de-activate and activate your
programm you will see the main window of the application again. Now
in Tiger I get this returned when the show window command is
triggered
NSReceiverEvaluationScriptError: 4 (1)
Does Anyone know how to show an window for the second time after it
was closed? Showing the first time works but fails on the second
attemp.
Yes, this is a bug. When you close the window, it suffers a name
loss (as in
The Spiriting Away of Sen and Chihiro). That's why the next time
you can't
show window "main" (as there isn't such a called window).
The workaround, IIRC, is attaching a "will close" event to the
window, then:
on will close theObject
set visible of theObject to false
return false
end will close
To show it:
set visible of window "blah" to true
jj
--
http://www.macscripter.net/
http://www.osaxen.com/