• 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: Getting the Item from NSOutlineView's Notifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the Item from NSOutlineView's Notifications


  • Subject: Re: Getting the Item from NSOutlineView's Notifications
  • From: Michael McCracken <email@hidden>
  • Date: Thu, 30 Jun 2005 17:13:14 -0700

It really should work with
id obj = [userInfo objectForKey:@"NSObject"];

Is that what you're doing? Note that we're using NSObject as a string here.

-mike

On 6/30/05, Seth Willits <email@hidden> wrote:
> I'm trying to save and restore the collapsed/expanded states of an
> outline view that is part of my document's window (and thus I can't
> use the provided autosave stuff) so I need to get the item object
> from the notifications, like:
>
> - (void)outlineViewItemDidExpand:(NSNotification *)notification
>
> But how are you supposed to actually get the item? I used NSLog with
> [notification userInfo] and it prints out that it has a single item
> with {NSObject = blah blah blah}, but the key NSObject doesn't work
> (even though that is clearly shown when printing [[notification
> userInfo] allKeys] and even [[[notification userInfo] allValues]
> objectAtIndex:0] doesn't work because it causes an exception. I've
> Googled, looked on CocoaDev, asked in #macdev on freenode, and looked
> in the list archives on Cocoa Builder. I'm being driven mad!
>
> This should be ridiculously simple, but nothing I try works and I'm
> feeling ridiculously silly!
>
>
>
> --
> Seth Willits
>
>  _______________________________________________
> 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
>


--
Michael McCracken
UCSD CSE PhD Student
San Diego Supercomputer Center
http://www.cse.ucsd.edu/~mmccrack/
 _______________________________________________
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: Getting the Item from NSOutlineView's Notifications
      • From: Seth Willits <email@hidden>
References: 
 >Getting the Item from NSOutlineView's Notifications (From: Seth Willits <email@hidden>)

  • Prev by Date: Flat Button Controls in Tiger
  • Next by Date: Re: ebook reader suggestions
  • Previous by thread: Getting the Item from NSOutlineView's Notifications
  • Next by thread: Re: Getting the Item from NSOutlineView's Notifications
  • Index(es):
    • Date
    • Thread