• 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: Compiler skipping code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler skipping code


  • Subject: Re: Compiler skipping code
  • From: Sherm Pendley <email@hidden>
  • Date: Wed, 20 Feb 2002 10:16:03 -0500

On Tuesday, February 19, 2002, at 09:08 PM, Daniel Byer wrote:

When debugging my application, the compiler completely skips over this line of code, not even executing it:
[[[NSThread alloc] init] detachNewThreadSelector:@selector(threadCommunicate:) toTarget:self withObject:nil];

It's not executing it because it's incorrect. The method you're calling isn't an instance method - it's static. You should call it like this instead:

[NSThread detachNewThreadSelector: @selector(threadCommunicate) toTarget: self withObject: nil];

Didn't PB complain about this when you built your project? It should have issued a "NSThread does not respond to ..." warning. It definitely should not have skipped over it silently.

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

References: 
 >Compiler skipping code (From: Daniel Byer <email@hidden>)

  • Prev by Date: Re: NSMatrix: which selectors?
  • Next by Date: Re: iDisk access in Cocoa
  • Previous by thread: Compiler skipping code
  • Next by thread: Double clicking rows vs. column headers
  • Index(es):
    • Date
    • Thread