• 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
@selector not working with (id)anObject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

@selector not working with (id)anObject


  • Subject: @selector not working with (id)anObject
  • From: Trygve Inda <email@hidden>
  • Date: Sun, 12 Apr 2009 00:20:53 +0000
  • Thread-topic: @selector not working with (id)anObject

[NSThread detachNewThreadSelector:@selector(threadMethod:) toTarget:self
withObject:@selector(myMethod)];


-(void)threadMethod:(id)anObject
{
  NSAutoreleasePool*    pool = [[NSAutoreleasePool alloc] init];
  SEL                   comp = (SEL)anObject;

    ... Do stuff ...

  [self performSelectorOnMainThread:comp withObject:nil waitUntilDone:NO];
  [pool release];
}


This crashes during detachNewThreadSelector. How can I pass a method to call
at the end of the thread processing as above?

Thanks,

Trygve


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: @selector not working with (id)anObject
      • From: Michael Ash <email@hidden>
    • Re: @selector not working with (id)anObject
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: Re: NSLog with %f and comparisons using ==
  • Next by Date: Re: @selector not working with (id)anObject
  • Previous by thread: Re: displaying a screen saver on multiple displays
  • Next by thread: Re: @selector not working with (id)anObject
  • Index(es):
    • Date
    • Thread