Re: NSArrayController Howto use in simple non-document application?
Re: NSArrayController Howto use in simple non-document application?
- Subject: Re: NSArrayController Howto use in simple non-document application?
- From: mmalcolm crawford <email@hidden>
- Date: Mon, 15 Mar 2004 00:41:04 -0800
On Mar 15, 2004, at 12:11 AM, Tod Cunningham wrote:
I am trying to use the "new" spiffy NSArrayController model in a
non-document based Cocoa application. I created an instance of my
model in IB and it exposes through key-value coding a single array
(groupList):
- (unsigned int)countOfGroupList;
- (id)objectInGroupListAtIndex:(unsigned int)index;
- (void)insertObject:(id)anObject inGroupListAtIndex:(unsigned
int)index;
- (void)removeObjectFromGroupListAtIndex:(unsigned int)index;
- (void)replaceObjectInGroupListAtIndex:(unsigned int)index
withObject:(id)anObject;
- (NSMutableArray *)groupList;
- (void)setGroupList:(NSMutableArray *)newGroupList;
Do I really need all those, or are the first 4 enough?
The first 4 suffice.
In IB, how do I connect the instance of model to the instance of
NSArrayController?
You cannot do so in IB, you must do it programatically. See:
<
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html>
for a number of examples.
mmalc
_______________________________________________
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.