Re: NSMutableArray, TableView, Bindings and Sorting
Re: NSMutableArray, TableView, Bindings and Sorting
- Subject: Re: NSMutableArray, TableView, Bindings and Sorting
- From: John Tsombakos <email@hidden>
- Date: Mon, 26 Jul 2004 00:13:35 -0400
On Jul 25, 2004, at 11:50 PM, mmalcolm crawford wrote:
>
- (NSArray *)arrangeObjects:(NSArray *)objects
>
<http://developer.apple.com/documentation/Cocoa/Reference/
>
ApplicationKit/ObjC_classic/Classes/NSArrayController.html>
>
>
See also examples at:
>
<http://homepage.mac.com/mmalc/CocoaExamples/controllers.html>
>
>
mmalc
>
Great, thanks!
Just want to double check I'm doing it right - I'm using
'arrangedObjects' - I wasn't sure what to use for "objects"
- (IBAction) doSort:(id)sender;
{
NSEnumerator *e;
Book *b;
NSArray *a;
// bookController - an outlet of the class, connected to the
NSArrayController
a = [bookController arrangedObjects];
e = [a objectEnumerator];
while (b = [e nextObject])
{
NSLog(@"%@", [b title]);
}
}
_______________________________________________
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.