On May 31, 2009, at 6:15 AM, [email protected] wrote:

Ok so more specifically I should have asked:

How do I get the NSSplitView to restore the divider position when my app relaunches the next time?

I set the autosave name but when I drag the splitter, then quit and relaunch, it's still in the default position, not the position it was in when I quit.


It would help if you'd post some code that displays the problem -- autosaving certainly works for me whether I call -setAutosaveName: in code or just set the name in IB. However, it sounds like you're calling -setAutosaveName: late in your app, and then not hitting the spot where it gets called when you run the app the second time. The method will set the position of the splitter as soon as you call it, but it obviously can't load the saved position until you've set the name that the data was saved under.

Try either setting the autosave name in IB or calling - setAutosaveName: immediately after you create the split view. And, in case it's not obvious, you certainly have to pass it the same name.

-Caleb
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to