• 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: 'selector not recognized' ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'selector not recognized' ?


  • Subject: Re: 'selector not recognized' ?
  • From: Shawn Erickson <email@hidden>
  • Date: Thu, 22 Jul 2004 11:08:40 -0700

On Jul 22, 2004, at 10:20 AM, Fritz Anderson wrote:

	NSView *		myParent = [self superview];
	//	Do things with myParent
	//	Stop doing things with myParent
	NSString *	scratch;
	[scanner scanString: @"foo" intoString: &scratch];

Both myParent and scratch will appear in the debugger's list of local variables, even though the same storage (or, likelier, register) is allocated to both. The debugger, being whizzy, tries to display the string value of scratch. But in the early part of the function, that register is filled with a pointer to an NSView, which doesn't respond to messages like "length". Whereupon the debugger belches loudly (*** -[NSView length]: selector not recognized) and refuses to be useful any more.

In an unoptimized executable (not compiler optimized) while in the same block of code myParent and scratch variables will be held in different memory slots on the stack, they will not share the same storage (even in optimized code they likely will be held in different slots).


Now both myParent and scratch pointers could point to the same location in memory either because on isn't initialized, explicit assignment, or the memory location they point at got reused.

I personally have not seen, at least noticed, the debugger issue you outline above when debugging an unoptimized executables but if it exists and prevents further use of the debugger in that session make sure to file a defect about it.

-Shawn
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: 'selector not recognized' ?
      • From: Fritz Anderson <email@hidden>
References: 
 >'selector not recognized' ? (From: Lance Drake <email@hidden>)
 >Re: 'selector not recognized' ? (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Anyone using xcode 1.5 to develop java web apps?
  • Next by Date: Re: Anyone using xcode 1.5 to develop java web apps?
  • Previous by thread: Re: 'selector not recognized' ?
  • Next by thread: Re: 'selector not recognized' ?
  • Index(es):
    • Date
    • Thread