Re: NSTableView
Re: NSTableView
- Subject: Re: NSTableView
- From: Nick Zitzmann <email@hidden>
- Date: Thu, 28 Feb 2008 17:49:12 -0700
On Feb 28, 2008, at 5:41 PM, Jeremy wrote:
In awakeFromNib:
categoriesArray = [[[NSMutableArray alloc] init] retain];
Here you're over-retaining an NSArray. This won't do anything if
you're using GC, but if you're not, then you've created a memory leak.
NSString *string;
string = [NSString init];
Never initialize a variable without allocating it memory first.
string = @"Main Category";
Here you've overwritten a variable you just (incorrectly) initialized.
If all you want is a string, then you can do this:
NSString *string = @"Main Category";
[...]
The NSTableView is not being populated at all... No rows, and
nothing else....
Did you remember to set the table view's data source?
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden