Restoring window state doesn't resize content view
Restoring window state doesn't resize content view
- Subject: Restoring window state doesn't resize content view
- From: Steve Mills <email@hidden>
- Date: Wed, 19 Jun 2013 11:08:57 -0500
If I crash my app with a saved document open, then relaunch, it will attempt to restore the window to its previous size and location. This happens after we've already gone through out custom code to ensure that windows do not appear behind our palettes. When the auto-restore code runs, it resizes the window, but the contained views to NOT resize correctly. They use old style constraints to lock the bottom and right edges to the bottom and right of the window. The views stay at the size they were after we constrained the window size. Why would the views not resize as a result of this auto-restore code? Here's the partial stack at the point where the window is restored (I added the setFrame:display: override just to see where this was happening):
#0 0x012fda83 in -[MusicWindow setFrame:display:] at /depot/Finale_Main/FinaleDev/Finale/SRC/FIN/MAC/CocoaShell/MusicWindowController.mm:171
#1 0x90c9fe70 in -[NSWindow _setFrameFromString:overrideTopLeft:constrainFullFrame:force:] ()
#2 0x90bc4a81 in -[NSWindow restoreStateWithCoder:] ()
#3 0x90bb868b in restorePersistentStateWithWindowRestoration ()
#4 0x90bc4883 in __94-[NSPersistentUIManager finishedRestoringWindowsWithZOrder:registerAsReady:completionHandler:]_block_invoke_0 ()
#5 0x90bc435a in +[NSWindow _batchMinimizeWindowsWithBlock:] ()
#6 0x90bc1f86 in -[NSPersistentUIManager finishedRestoringWindowsWithZOrder:registerAsReady:completionHandler:] ()
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden