• 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: Newb question: which feature am I looking for?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newb question: which feature am I looking for?


  • Subject: Re: Newb question: which feature am I looking for?
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 11 Feb 2008 22:00:42 -0800


On 11 Feb '08, at 9:25 PM, frenchyp wrote:

Now I need to be able to detect that a file name has been highlighted (filenames are kept in NSTextFieldCells), call a controller method, and access the filename itself.

The outline view posts a NSOutlineViewSelectionDidChangeNotification when the selection changes. Add an observer for that. From there you can call -selectedRow and -itemAtRow: to get the selected data item. The items are whatever you set them to be in your data-source methods ... probably something like NSStrings with paths in them.


(The outline doesn't actually store the filenames in NSTextFieldCells. Each table/outline column only has one cell, which it moves from row to row to draw each one, like a stencil. The data storage is external, in the dataSource object. That allows the view to display arbitrarily huge data sets without consuming huge amounts of memory.)

—Jens_______________________________________________

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


  • Follow-Ups:
    • Re: Newb question: which feature am I looking for?
      • From: frenchyp <email@hidden>
References: 
 >Newb question: which feature am I looking for? (From: frenchyp <email@hidden>)

  • Prev by Date: Re: NSCollectionView questions
  • Next by Date: Re: Newb question: which feature am I looking for?
  • Previous by thread: Newb question: which feature am I looking for?
  • Next by thread: Re: Newb question: which feature am I looking for?
  • Index(es):
    • Date
    • Thread