• 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: tableSelectionDidChange
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tableSelectionDidChange


  • Subject: Re: tableSelectionDidChange
  • From: Ondra Cada <email@hidden>
  • Date: Thu, 30 Aug 2001 21:03:08 +0200

Darin,

>>>>>> Darin Duphorne (DD) wrote at Thu, 30 Aug 2001 12:19:32 -0500:
DD> I have a working tableView which populates based on textFields and
DD> action buttons. How would I implement tableSelectionDidChange
DD> notification to, for example, populate the text fields again with the
DD> values of the columns in a selected row?

I am not sure I understand you well -- do you mean this?

...
[center addObserver:self selector:@selector(xyz:)
name:NSTableViewSelectionDidChangeNotification object:nil];
...

-(void)xyz:(NSNotification*)nn {
NSTableView *tv=[nn object];
int row=[tv selectedRow];
if (row<0) ... clear fields ...
else ... set fields to values from [tv dataSource], using rowIndex:row ...
}

It's that simple.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc


References: 
 >tableSelectionDidChange (From: Darin Duphorne <email@hidden>)

  • Prev by Date: Re: NSCursor and 1 bit mask ?
  • Next by Date: Re: speed daemons
  • Previous by thread: tableSelectionDidChange
  • Next by thread: Re: tableSelectionDidChange
  • Index(es):
    • Date
    • Thread