Re: Bindings debugging woes
Re: Bindings debugging woes
- Subject: Re: Bindings debugging woes
- From: Scott Anguish <email@hidden>
- Date: Sun, 12 Feb 2006 00:19:22 -0500
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..
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]
If I try to use a class to pose as NSDictionary so that I can
override valueForKeyPath: to see what is being requested, I get an
even more severe outcome:
#0 0x909c8cc0 in _objc_trap
#1 0x909c8c38 in _objc_error
#2 0x909c8bc4 in __objc_error
#3 0x909c1970 in class_poseAs
#4 0x0006d8f4 in +[ClassInWhichPosingIsSetUp initialize] at
ClassInWhichPosingIsSetUp.m:26
#5 0x909bf670 in class_initialize
[snip]
How can I go about chasing this problem?
Thanks,
Hamish
_______________________________________________
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
_______________________________________________
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