Re: Controller Binding
Re: Controller Binding
- Subject: Re: Controller Binding
- From: Dustin Voss <email@hidden>
- Date: Sun, 23 Nov 2003 15:56:09 -0800
On 23 Nov, 2003, at 11:41 AM, email@hidden wrote:
For reasons of design, I've opted for subclassing NSValueTransformer,
but it does not seem to work:
- (id) transformedValue: (id)value
{
if (value == NSNoSelectionMarker)
return @"dgsdgdsg";
else
return @"dsgdgfgsdg";
}
Apparently, value is the same proxy object each time, so I can't test
it. How do I implement this function?
I've noticed that you can't seem to check a value against
NSNoSelectionMarker etc. directly. I had code similar to the following,
which didn't work for the same reason:
- (id) doTableAction:(id)sender
{
if ([myArrayController selection] != NSNoSelectionMarker)
etc.
}
I ended up checking selectionIndex which return NSNotFound if there's
no selection. That seemed to work. Your value transformer could use the
same technique, but it would need access to the array controller.
I think this is a bug, but I'm not sure how to classify it --
documentation or functionality.
_______________________________________________
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.