Re: Newb question: which feature am I looking for?
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