NSTableView, NSTextView weirdness
NSTableView, NSTextView weirdness
- Subject: NSTableView, NSTextView weirdness
- From: Hasan Diwan <email@hidden>
- Date: Mon, 25 Nov 2002 22:07:16 -0500
I have an array, whose elements are dictionaries consisting of: (key,
value) pairs. The tableView is supposed to display the key, and the
NSTextView is supposed to display values. valueView is the NSTextView
and keyView is the NSTableView. In my Data Source (which is set), I
have:
(id)tableView:(NSTableView *)tv
objectValueForTableColumn:(NSTableColumn *)aTC row:(int)rowIndex {
id t = [data objectAtIndex:rowIndex];
[valueView setString:[t sortData]];
[t autorelease];
return [t sortKey];
}
(void)tableView:(NSTableView *)tv setObject:(id)anObject
forTableColumn:(NSTableColumn *)aTC row:(int)rowIndex {
[[data objectAtIndex:rowIndex] setSortKey:anObject];
[[data objectAtIndex:rowIndex] setSortString:[valueView string]];
}
Needless to say, these don't do what they're supposed to. The
NSTextView's string is never stored in the array, like it's supposed to
be. Only the keys are stored. Any help is appreciated. Thanks in
advance! I eliminated the NSLog(@"%@", [data description]) lines from
the two functions.
Hasan Diwan
OpenPGP KeyID: 0xBE42DCA6
Fingerprint: 1CB0 47E3 0A24 DAC1 DCCA 4225 F166 40C2 BE42 DCA6
http://www.cs.rpi.edu/~diwanh/gpg.key
[demime 0.98b removed an attachment of type application/pgp-signature which had a name of PGP.sig]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.