Unvending a DO?
Unvending a DO?
- Subject: Unvending a DO?
- From: Lisa Zorn <email@hidden>
- Date: Thu, 14 Mar 2002 19:58:06 -0800 (PST)
Hello hello,
I was wondering if anyone could tell me how to unvend a DO.
In particular, I vend it using the standard code in the documentation:
// vend myself
vendingConnection_ = [[NSConnection alloc] init];
[vendingConnection_ setRootObject:self];
[vendingConnection_ setDelegate:self];
if ([vendingConnection_ registerName:vendingObjName] == NO) {
/* Handle error. */
...
}
But I don't want to vend it for very long. So I try to unvend when I
want to stop:
if (vendingConnection_) {
// NSLog(@"Trying to unvend");
[vendingConnection_ setRootObject:nil];
[vendingConnection_ setDelegate:nil];
[vendingConnection_ registerName:nil];
[vendingConnection_ invalidate];
[vendingConnection_ release];
}
vendingConnection_ = nil;
However, this last part isn't working. After I call it, when I try to
retrieve the vended object in another application, I don't get nil.
But when I try ot make a call on that object, my application hangs.
How do I unvend the object?
Also, I want to be absolutely positive that only programs running on
the same machine can access the vended object. How can I be _certain_?
(There have been some posts on how to vend to other machines on the
local network but I didn't see this explicitly mentioned.)
thanks very much,
-lisa
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/
_______________________________________________
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.