• 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: Saving State of NSOutlineView in Document-based App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving State of NSOutlineView in Document-based App


  • Subject: Re: Saving State of NSOutlineView in Document-based App
  • From: Shawn Erickson <email@hidden>
  • Date: Mon, 28 Mar 2005 09:25:58 -0800


On Mar 26, 2005, at 5:11 PM, Kirt Cathey wrote:

After reviewing another posting in this archive, I added the following in the init portion of the data source.
[outline setAutosaveName:@"Subscriptions Outline"];
[outline setDataSource:dataSource];
[outline setDelegate:dataSource];
[outline setAutosaveExpandedItems:YES];


Then in the data source also added the following methods:

- (id)outlineView:(NSOutlineView *)outlineView persistentObjectForItem:(id)item
{
return [NSKeyedArchiver archivedDataWithRootObject:item];
}


- (id)outlineView:(NSOutlineView *)outlineView itemForPersistentObject:(id)object
{
return [NSKeyedUnarchiver unarchiveObjectWithData:object];
}


All of which is verbatim off of the existing archives. Upon debugging, the first set of statements included in the data source init section are called, but the associated methods are not called at all.

When you see these called is the "outline" outlet actually valid (not nil)?


If your data source is an object instantiated in your nib then you cannot do the calls against the outlet at init time but have to do it at awakeFromNib time.

-Shawn

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Saving State of NSOutlineView in Document-based App
      • From: "Kirt Cathey" <email@hidden>
    • Re: Saving State of NSOutlineView in Document-based App
      • From: "Kirt Cathey" <email@hidden>
References: 
 >Saving State of NSOutlineView in Document-based App (From: "Kirt Cathey" <email@hidden>)

  • Prev by Date: Re: Saving State of NSOutlineView in Document-based App
  • Next by Date: Need longer highlight w/ NSButton performClick:
  • Previous by thread: Saving State of NSOutlineView in Document-based App
  • Next by thread: Re: Saving State of NSOutlineView in Document-based App
  • Index(es):
    • Date
    • Thread