App crashes when I close window

Hi all,

I have an ASS app with two windows. The window “main” opens the window “settings”. When I use the red round button on the top left corner of the “settings” win it closes and I still see my “main”.

But when I use

close window "settings"

the app crashes and I get this in the log:
myApp has exited due to signal 11 (SIGSEGV).

This seems pretty basic to me, but I didn’t find any hint on this problem in the forum nor anywhere else on the web - so any hint is appreciated!

Thanks,
jaco

PS: I also tried to close the window from the “main” script, but with the same result.

Try:

hide window "settings"

or

set visible of window "settings" to false

Hi Querty,

thanks, your code works. But I need the possibility to realy close the window, just like when the user clicks the window’s red round button.

Is there a way to achieve this without crashing my app?

Thanks,
jaco

Is it really a window, or is it a panel (NSPanel)?

Did you happen to mess around with any of the attributes of this “settings” window in the Interface Builder inspector? For example, “Release when closed” shouldn’t be checked, while “Deferred” and “One shot” should be.

This sounds like an autorelease problem.

Model: Dual 2.7 GHz PowerPC G5; 2.5 GB RAM
Browser: Safari 412
Operating System: Mac OS X (10.4)

Ahah…

Looks like this post has more info:

http://bbs.applescript.net/viewtopic.php?id=11150