• 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: Darin Duphorne <email@hidden>
  • Date: Thu, 30 Aug 2001 15:45:55 -0500

Thanks for the help - I'm still having difficulty:

Data is stored in array (records) of MutableDictionary (record) like so:

<plist version="0.9">
<array>
<dict>
<key>Email</key>
<string>email@hidden</string>
<key>First Name</key>
<string>tester</string>
<key>Home Phone</key>
<string>123-1234</string>
<key>Last Name</key>
<string>dude</string>
</dict>
</array>
</plist>



- (void)awakeFromNib
.
.
.
//implement row change notification
center=[NSNotificationCenter defaultCenter];
[center addObserver:self
selector:@selector(getDataFromSelectedRow:)
name:NSTableViewSelectionDidChangeNotification
object:nil];
}
- (NSDictionary *)createRecord
{
NSMutableDictionary *record = [[NSMutableDictionary alloc] init];
.
//create record from textFields
.
[record autorelease];
return record;
}
.
//misc. table methods not shown
.
// Display selected data
-(void)getDataFromSelectedRow:(NSNotification*)nn
{
NSTableView *tv=[nn object];
id selectedItem = [records objectAtIndex:[tv selectedRow]];
id theValue = [selectedItem objectForKey:eMail];
NSLog(@"eMail:",theValue);
}

@end


  • Prev by Date: How to communicate with NSSocketPort
  • Next by Date: Java IDE for Swing: nib approach vs code generation?
  • Previous by thread: Re: tableSelectionDidChange
  • Next by thread: what's difference and relationship between CoreFoundation and Fou ndation framework
  • Index(es):
    • Date
    • Thread