On Tue, Mar 24, 2009 at 9:59 AM, Sourabh Sahu
<sourabh_s...@persistent.co.in> wrote:

> I have created a NStableView and populated a data onto it.

  How? NSTableDataSource protocol or via Bindings? That's important.


> Now I want user can only click on a cell and when it clicked on cell,the 
> value of that cell
> get displayed onto some NSTextField.

  If via NSTableDataSource, you don't have the benefit of an array
controller keeping track of selection, so you'll want to use
NSTableView's delegate methods (look in the NSTableView Class
Reference). There're a few dealing with selection. Implement the
desired method(s) and respond to them accordingly (such as by updating
your text field).

  If via Bindings, you'd just bind the field's value to your table's
array controller's selection.desiredKeyPath (where "desiredKeyPath" is
the property of the selected row's corresponding object you wish to
display).


> DISCLAIMER
> ==========
> This e-mail may contain privileged and confidential information which is the 
> property of
> Persistent Systems Ltd. ...

  Wow. Probably shouldn't have posted it to a public mailing list then, huh? ;-)

--
I.S.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to