• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa-dev Digest, Vol 6, Issue 811
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa-dev Digest, Vol 6, Issue 811


  • Subject: Re: Cocoa-dev Digest, Vol 6, Issue 811
  • From: Caleb Strockbine <email@hidden>
  • Date: Sun, 31 May 2009 15:32:57 -0400

On May 31, 2009, at 6:15 AM, email@hidden 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@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


  • Prev by Date: Re: Several Questions
  • Next by Date: Hidden API?
  • Previous by thread: Re: Cocoa-dev Digest, Vol 6, Issue 811
  • Next by thread: Label randomly cut off in NSOutlineView column
  • Index(es):
    • Date
    • Thread