• 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
NotificationCenter, NSConnection, distributed notifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NotificationCenter, NSConnection, distributed notifications


  • Subject: NotificationCenter, NSConnection, distributed notifications
  • From: Cocoa Developer <email@hidden>
  • Date: Mon, 22 Sep 2003 21:31:01 -0700

Hi,

I was wondering if anyone knew anything about what I am about to
describe.

I have a python program that has a c module which interfaces with
objective-C code. Yes, it can be done.

The purpose of this program is to interface with UIs built by third
parties and use distributed objects for messaging. With a defined
protocol, the UI is able to setup a NotificationCenter and hoped to
communicate with our python/c module/Objective-C app. While we have
tested our UI with two different objective-C test programs, we have yet
to get the Objective-C test app to communicate with the python/c
module/Objective-C app.

Currently, we have found that the following code does create a
TESTServer. In fact, if we try to run the other Objective-C program
which registers a TESTServer, we get the error "Error registering
PACEServer".


@interface MYTestServer : NSObject <aProtocol> {
}
@end
MYTestServer *server;
NSConnection *defaultConnection;
NSAutoreleasePool *pool;


server = [[MYTestServer alloc] init];
pool = [[NSAutoreleasePool alloc] init];

defaultConnection = [NSConnection defaultConnection];
[[NSNotificationCenter defaultCenter] addObserver:server
selector:@selector(connectionDidDie:)
name:NSConnectionDidDieNotification
object:nil];

[defaultConnection setRootObject:server];
if ([defaultConnection registerName:@"TESTServer"] == NO) {
NSLog(@"Error registering PACEServer");
}

However, the TestUI fails when it reaches the following line when the
python/c module/Objective-C app server is running. It works, with the
other non-python test program.

server = [[NSConnection
rootProxyForConnectionWithRegisteredName:@"TESTServer" host:nil]
retain];




Question:

1) has anyone ever got something like this to work?
2) is it even possible? -- so I can tell my boss and work from a backup
plan.
3) what am I doing wrong?
4) are you going to vote for the CA recall?


Thank you in advance,
Randy
_______________________________________________
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.

  • Prev by Date: Saving Plug-in Data into Document?
  • Next by Date: Re: Objective-C Question
  • Previous by thread: Saving Plug-in Data into Document?
  • Next by thread: IB problem with NSMatrix
  • Index(es):
    • Date
    • Thread