3

I have an older application that consistently crashes on 10.7. It appears to be related to the new window restoration feature. Is there a way to disable this behavior via Info.plist or a preference? How about in ObjC code?

Dwight Kelly
  • 1,232
  • 2
  • 11
  • 17
  • I found the API calls. Is the default behavior to disable both of these? `@interface NSWindow (LionSDKDeclarations) - (void)toggleFullScreen:(id)sender; - (void)setRestorable:(BOOL)flag; @end` – Dwight Kelly Sep 02 '11 at 20:27

2 Answers2

4

You can disable it by modifying a default like this when your application starts up.

 defaults write applicationidentifier NSQuitAlwaysKeepsWindows -bool false

Where applicationidentifier is the identifier of your application. For example, com.Apple.TextEdit for TextEdit.

Of course, the real thing to do is fix your application to support this feature properly.

vcsjones
  • 138,677
  • 31
  • 291
  • 286
1

You can toggle window restoration in Interface Builder, too. Just go to the Attributes Inspector.

Nickkk
  • 2,261
  • 1
  • 25
  • 34