Re: NSTableView
Re: NSTableView
- Subject: Re: NSTableView
- From: Jeremy <email@hidden>
- Date: Thu, 28 Feb 2008 19:41:38 -0500
This is how I am attempting to do it...
In awakeFromNib:
categoriesArray = [[[NSMutableArray alloc] init] retain];
NSString *string;
string = [NSString init];
string = @"Main Category";
[categoriesArray addObject:string];
[categories selectRow:1 byExtendingSelection:NO];
[categories scrollRowToVisible:1];
And my informal protocols:
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
{
return [categoriesArray count];
}
- (id)tableView:(NSTableView *)aTableView objectValueForColumn:
(NSTableColumn *)aTableColumn row:(int)row
{
return [categoriesArray objectAtIndex:row];
}
The NSTableView is not being populated at all... No rows, and nothing
else....
Jeremy
"For a long time it puzzled me how something so expensive, so leading
edge, could be so useless, and then it occurred to me that a computer
is a stupid machine with the ability to do incredibly smart things,
while computer programmers are smart people with the ability to do
incredibly stupid things. They are, in short, a perfect match." - Bill
Bryson
On Feb 28, 2008, at 7:39 PM, Hamish Allan wrote:
On Fri, Feb 29, 2008 at 12:34 AM, Jeremy <email@hidden>
wrote:
I am trying to figure NSTableViews out. I have two table views inside
of my window. The code I have is completely useless and not working.
Can anyone explain how to populate an NSTableView using arrays? If
you
could that would be greatly appreciated.
You should explain how what you are trying to do differs from what is
covered in the various basic tutorials for using NSTableViews;
otherwise we will not know how to address your question.
Hamish
_______________________________________________
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