Re: Bindings debugging woes
Re: Bindings debugging woes
- Subject: Re: Bindings debugging woes
- From: Hamish Allan <email@hidden>
- Date: Mon, 13 Feb 2006 14:39:21 +0000
On 12 Feb 2006, at 05:19, Scott Anguish wrote:
perhaps the bindings debug flag ??
http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaBindings/Concepts/Troubleshooting.html#//apple_ref/doc/uid/
TP40002148-182476
the problem may be that the raise is called before the bindings get
a chance to flag the error in console..
Thanks. I'd expect the bindings debug flag to be useful if the
exception were something of the form "this class is not key value
coding-compliant for the key named..."
But -[NSDictionary(NSKeyValueCoding) valueForKeyPath:] is calling
[NSCFString characterAtIndex:] for an illegal index.
This strikes me as a bug in Apple's code, rather than mine, but maybe
I'm missing something...
Best wishes,
Hamish
On Feb 10, 2006, at 1:51 PM, Hamish Allan wrote:
I'm trying to use a property list as the data model for an
NSTreeController binding to an NSBrowser. I load it in from the
bundle and it seems fine, i.e. I can do this sort of thing:
NSLog(@"%@", [[[self valueForKeyPath:@"children"] objectAtIndex:0]
valueForKeyPath:@"name"]);
and get the right sort of answer. However, when it's being used by
the bindings, I'm getting an "-[NSCFString characterAtIndex:]:
Range or index out of bounds" error.
If I put a breakpoint on -[NSException raise], here is the stack
trace:
#0 0x92901508 in -[NSException raise]
#1 0x9290135c in +[NSException raise:format:]
#2 0x928f5ffc in -[NSCFString characterAtIndex:]
#3 0x928f6088 in -[NSDictionary(NSKeyValueCoding) valueForKeyPath:]
#4 0x938b6538 in -[NSBinder
_valueForKeyPath:ofObject:mode:raisesForNotApplicableKeys:]
#5 0x93b4d414 in -[NSBinder
valueForBinding:atIndexPath:resolveMarkersToPlaceholders:]
#6 0x93bbbdb8 in -[NSBrowserBinder
browser:createRowsForColumn:inMatrix:]
#7 0x938224b4 in -[NSBrowser addColumn]
[snip]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden