Re: NSOutlineView meta-problem
Re: NSOutlineView meta-problem
- Subject: Re: NSOutlineView meta-problem
- From: David Wood <email@hidden>
- Date: Wed, 11 Jun 2003 22:40:45 -0400
On Wednesday, June 11, 2003, at 02:32 PM, John C. Randolph wrote:
On Wednesday, June 11, 2003, at 08:03 AM, David Wood wrote:
In the case of the takeValue:forKey:, Cocoa complained about not
finding an appropriate method to call. In the case of
outlineView:setObjectValue:forTableColumn:byItem, it didn't complain,
even when outlineView:shouldEditTableColumn: said it was editable.
Isn't this inconsistent behavior?
I wouldn't say so, since when you call -takeValue:forKey: you're more
or less promising that there's a setter with the appropriate name.
You're not making any promises when it comes to implementing the data
source methods.
Aren't I making promises? The columns are set Editable in Interface
Builder, and outlineView:shouldEditTableColumn: returns YES. Either of
those could constitute that "promise". They both tell the system
"Someone may stick data in here." Such a request is rarely followed up
by "If it does come in here, just ignore it."
Either the results have to be stored, or processed and verified. And
either job requires the datasource to do something with the data, hence
the need for outlineView:setObjectValue:forTableColumn:byItem. Or
something very similar. I'm not trying to be argumentative and belabor
the point (okay, maybe just a little), but it did come as an awful
surprise when the method I'd written up never got hit by the debugger
and no reason or suggestion why was forthcoming.
--David
http://skipjack.bluecrab.org/~dwood
"I have meditated, and gotten in touch with my inner bastard."
_______________________________________________
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.