• 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
NSConnection problems - HELP
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSConnection problems - HELP


  • Subject: NSConnection problems - HELP
  • From: Steve Gehrman <email@hidden>
  • Date: Sat, 15 Sep 2001 02:14:58 -0700

I'm creating an NSConnection between two threads. If I pass an NSString, it works perfectly. If I pass my own object, I get this exception. My custom Object adopts the NSCopying, NSCoding, and NSMutableCopying protocols just like NSString (but none of those routines ever seem to get called.

To make things more complex, I'm passing the parameter to another thread. NSString does work, maybe it's just getting lucky?

- (oneway void)startThread:(in id)param
{
[NSThread detachNewThreadSelector:@selector(runSafeThread:) toTarget:self withObject:param];
}

I get this exception

Sep 15 02:10:11 xxxx[1758] An uncaught exception was raised
Sep 15 02:10:11 xxxx[1758] NSDistantObject accessed attempted from another thread
Sep 15 02:10:11 xxxx[1758] *** Uncaught exception: <NSObjectInaccessibleException> NSDistantObject accessed attempted from another thread

here's my object

// run parameter
@interface FindParam : NSObject <NSCopying, NSMutableCopying, NSCoding>

{
int _task; // 0 == locate, 1 == find, 2 == update
NSString *_directoryPath;
NSString *_searchString;
}

Thanks,

Steve Gehrman


  • Follow-Ups:
    • Re: NSConnection problems - HELP
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: Simple messaging across the internet
  • Next by Date: Re: Simple messaging across the internet
  • Previous by thread: Re: Mac OS X UI
  • Next by thread: Re: NSConnection problems - HELP
  • Index(es):
    • Date
    • Thread