NSConnection problems - HELP
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