• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSIndexPath & NSTreeController issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: NSIndexPath & NSTreeController issues [solved]
      • From: goessly <email@hidden>
References: 
 >NSIndexPath & NSTreeController issues (From: goessly <email@hidden>)

  • Prev by Date: Re: Problem with linking against a private framework
  • Next by Date: Re: Persistent ZeroLink
  • Previous by thread: NSIndexPath & NSTreeController issues
  • Next by thread: Re: NSIndexPath & NSTreeController issues [solved]
  • Index(es):
    • Date
    • Thread