• 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: Programmatically adding objects to an ArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically adding objects to an ArrayController


  • Subject: Re: Programmatically adding objects to an ArrayController
  • From: Mike Abdullah <email@hidden>
  • Date: Tue, 16 May 2006 11:26:55 +0100

Either should do the job just fine.

I don't know the exact specifics of your case, but I assume that the Array Controller is hooked up to some custom class of yours. Why not make it set the inital array in its init method?

Also, I don't know which of the two below is preferable, perhaps someone else can enlighten.

Mike.

On 16 May 2006, at 10:01AM, Jesus De Meyer wrote:

Hi (again),

I'm using an ArrayController to feed data to an NSTableView. However, in my awakeFromNib method, I would like to add some standard data to this ArrayController. The ArrayController is bound to a method that returns an NSMutableArray for its contentArray field.

So to add an object to this array, do I have to do something like this? Or is there a better way?

[myArrayController addObject:theObject];
[myArray addObject:theObject];

Thanks in advance,

Jesus
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Programmatically adding objects to an ArrayController
      • From: mmalcolm crawford <email@hidden>
References: 
 >Programmatically adding objects to an ArrayController (From: Jesus De Meyer <email@hidden>)

  • Prev by Date: Message.framework header question
  • Next by Date: Re: More Mac like handling of OS raised exceptions
  • Previous by thread: Programmatically adding objects to an ArrayController
  • Next by thread: Re: Programmatically adding objects to an ArrayController
  • Index(es):
    • Date
    • Thread