• 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: Oddness with NSArray (Most likely some other stupid mistake)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Oddness with NSArray (Most likely some other stupid mistake)


  • Subject: Re: Oddness with NSArray (Most likely some other stupid mistake)
  • From: "Erik J. Barzeski" <email@hidden>
  • Date: Sun, 10 Nov 2002 20:35:50 -0500

Hi,

See below...

On 11/10/02 5:54pm, "email@hidden"
<email@hidden> wrote:
> From: James Farwell <email@hidden>
> Date: Sat, 9 Nov 2002 14:50:47 -0800
> To: email@hidden
> Subject: Oddness with NSArray (Most likely some other stupid mistake)
>
> First off I just want to state for the record that I'm still fairly new
> to Objective-C/Cocoa, so if I'm doing something totally stupid that is
> the result of inexperience, I apologize. I have an app with a
> controller class that manages a list of smaller controller classes for
> external nibs (sort of like a plug-in type situation). The only real
> complexity is that the external nibs have a button to add a new sub
> controller instance to the list. I am having problems with the
> following code:
>
> @implementation MyController
>
> - (void)awakeFromNib
> {
> children = [NSMutableArray arrayWithCapacity:10];

That's a convenience method. You need to retain your children array or
it'll be released (autoreleased).

> [self addNewChild];
> }

See this (not technically finished or published yet, but... soon):
http://cocoadevcentral.com/tutorials/showpage.php?show=00000063.php


--
Kindest regards,
Erik J. Barzeski

"I have enough trouble overcoming my own limitations without
fretting over the fact that God has not seen fit to distribute
evenly the gift of intelligence" - John Wanamaker
###################################################################
Email: erik@(anything below) AIM: iacas

http://iacas.org http://weims.net
http://techstra.net http://barzeski.com
http://cocoadevcentral.com http://soundsetcentral.com
http://freshlysqueezedsoftware.com http://applescriptcentral.com
###################################################################
_______________________________________________
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.

  • Prev by Date: Re: Oddness with NSArray (Most likely some other stupid mistake)
  • Next by Date: NSTimer & NSInternalInconsistencyException
  • Previous by thread: Re: Oddness with NSArray (Most likely some other stupid mistake)
  • Next by thread: Re: Oddness with NSArray (Most likely some other stupid mistake)
  • Index(es):
    • Date
    • Thread