RE: Re: Displaying NSArray in NSTableView
RE: Re: Displaying NSArray in NSTableView
- Subject: RE: Re: Displaying NSArray in NSTableView
- From: 양승준 <email@hidden>
- Date: Tue, 18 Nov 2008 09:57:43 +0900
- Importance: normal
Thank you for replying.
I connected dataSource by ctrl-dragging from the tableView to File's owner and selecting dataSource. If I change the number of elements of the array, the number of rows in the tableView changes. The problem is that the data in the array doesn't show up...
-----Original Message-----
From: "Quincey Morris"<email@hidden>
To: email@hidden
Cc:
Sent: 08-11-18(화) 04:01:57
Subject: Re: Displaying NSArray in NSTableView
On Nov 17, 2008, at 04:03, 양승준 wrote:
> Hi, I'm trying to display data in an array to a table view. The
> table view shows three rows, but no data in them. What did I do
> wrong? In IB, I connected the table view to the delegate in File's
> owner. Many thanks!
> Here is MyDocument.h:
> #import Cocoa.h>
> @interface MyDocument : NSDocument
> {
> IBOutlet NSTableView *parTableView;
> NSArray *parBuffer;
> }
> - (int)numberOfRowsInTableView:(NSTableView *)aTable;
> - (id)tableView:(NSTableView *)aTable objectValueForColumn:
> (NSTableColumn *)aCol row:(int)aRow;
> @end
These are data source methods, not delegate methods. Did you connect
the table view's data source to the document?
_______________________________________________
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
_______________________________________________
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