Re: / two questions /
Re: / two questions /
- Subject: Re: / two questions /
- From: Yann Bizeul <email@hidden>
- Date: Thu, 17 Jun 2004 18:54:49 +0200
>
Question number one: i'm trying to populate a NSTableView element in my
>
interface with the data of a NSMutableArray of NSStrings. I do
>
[characterScroll setDataSource: theCharacters]; to set the array as its
>
data source. When I run the app, I get the following: Illegal
>
NSTableView data source [] Must implement numberOfRowsInTableView: and
>
tableView:objectValueForTableColumn:row:
>
I already implemented numberOfRowsInTableView: and
>
tableView:objectValueForTableColumn:row: but I keep getting the error.
You are telling the DataSource is an NSArray, or a subclass of it that
responds to numberOfRowsInTableView: and
tableView:objectValueForTableColumn:row: ?
Because if it is just an NSArray, I suggest your read the docs about
NSTableView and its dataSource.
>
Question number two: i'm trying to draw a bar graphic with some data. I
>
wrote a method in my Graphic class but it doesn't draw a thing when it
>
is invoked. Can I draw things only if they are in the drawRect: code?
Yes
>
Is there an easier way to do the bar graphic? Later on I'm gonna need
>
some user interaction with those bars...
I suggest you subclass NSView, draw things in its drawRect: and catch
mouse events to do what you want.
--
Yann Bizeul - yann at tynsoe.org
http://projects.tynsoe.org/
_______________________________________________
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.