Re: NSIndexPath & NSTreeController issues
Re: NSIndexPath & NSTreeController issues
- Subject: Re: NSIndexPath & NSTreeController issues
- From: John Stiles <email@hidden>
- Date: Tue, 3 Jan 2006 11:03:46 -0800
-length returns a number, not an NSObject. You need to use %d, not %@.
On Jan 3, 2006, at 10:31 AM, goessly wrote:
There has already been an unsolved posting [*] to this list,
discussing the fact that using NSIndexPaths in combination with
NSTreeController may result in unstable code. Well, my App crashes
while trying to retrieve the length of a selectionIndexPath, while
the Path itself is retrieved without any trouble.
This can easily be recreated by adding two lines to the core data
example "OutlineEdit":
- (IBAction) createNote: sender;
{
[outlineTreeController add:sender];
// works perfectly:
NSLog(@"%@",[outlineTreeController selectionIndexPath]);
// dies immediately:
NSLog(@"%@",[[outlineTreeController selectionIndexPath] length]);
}
Any ideas? Further readings? Stupid mistakes on my behalf? I don't
get it...
Best regards,
goessly
[*] http://www.cocoabuilder.com/archive/message/cocoa/
2005/11/10/149898
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com
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