• 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: NSArrayController Howto use in simple non-document application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >NSArrayController Howto use in simple non-document application? (From: Tod Cunningham <email@hidden>)

  • Prev by Date: disk utility
  • Next by Date: one of the children has bad/missing connection
  • Previous by thread: NSArrayController Howto use in simple non-document application?
  • Next by thread: lost with help books
  • Index(es):
    • Date
    • Thread