Re: Strange exception raised in NSObjectParameterBinder during manual binding
Re: Strange exception raised in NSObjectParameterBinder during manual binding
- Subject: Re: Strange exception raised in NSObjectParameterBinder during manual binding
- From: Michael Norris <email@hidden>
- Date: Thu, 23 Aug 2007 23:31:47 +0200
Thanks! I found that it didn't like:
"[<MNTextView 0x3a8b50> setNilValueForKey]: could not set nil as the
value for the key fixationLocation."
OK, that's fair enough: fixationLocation is an int and can't handle
the fact that the controllers aren't populated yet. So to avoid
passing nil values, I changed the bindings to:
NSDictionary *noNull = [NSDictionary dictionaryWithObject:[NSNumber
numberWithBool:NO] forKey:NSAllowsNullArgumentBindingOption];
[view bind:@"backgroundColor" toObject:itemSetsController
withKeyPath:@"selection.bgColour" options:noNull];
[view bind:@"textColour" toObject:itemSetsController
withKeyPath:@"selection.textColour" options:noNull];
[view bind:@"fixationLocation" toObject:itemsController
withKeyPath:@"selection.fixationLocation" options:noNull];
[view bind:@"fixationLocationMode" toObject:itemsController
withKeyPath:@"selection.fixationLocationMode" options:noNull];
[view bind:@"hasFixationScreen" toObject:itemSetsController
withKeyPath:@"selection.hasFixationScreen" options:noNull];
However, it still tries to send 'nil'... strange...
M
On 23/08/2007, at 9:46 PM, Nick Zitzmann wrote:
On Aug 23, 2007, at 1:39 PM, Michael Norris wrote:
I got the following NSException raised today, which occurs in the
midst of a manual binding. If I continue, the binding itself goes
through fine, and works no problem. However, the exception worries
me, and I'd like to know why I'm getting it. Any hints on working
out where this is coming from, or how I can debug it? I'm not very
au fait with turning registers into Cocoa objects while I'm in
Assemblyland.
Next time you get the exception, type "po $r3" on PowerPC or "po *
(int *)($ebp+8)" on Intel into the debugger console to get a
description of the exception.
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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