[Openmcl-devel] Rendezvous for OpenMCL

Gary Byers gb at clozure.com
Mon Jun 30 21:31:48 UTC 2003

On Mon, 30 Jun 2003, Brendan Burns wrote:

> Hey guys,
> attached is an initial draft of rendezvous for OpenMCL, however the
> setDelegate code doesn't appear to be working.  Anyone have any idea?
> --brendan

My admittedly fuzzy model of how this sort of thing would/could work
is that there would need to be a "runloop" (event loop, sort of) in
the picture somewhere.

Requiring "COCOA" causes (somewhere in there ...) an NSApplication
object to be instantiated and its "run" method to be invoked.  "run"
basically listens for messages on a set of Mach IPC ports (some of
which may be connected to the window server) and handles them (often
by generating an NSEvent object and passing it through the Cocoa
event system, but sometimes in other ways.)

A typical ObjC Cocoa application does all of this by having its
main() function call NSApplicationMain().  In the lisp example code,
it happens in a few steps (we have to jump through some hoops because
we usually weren't launched as a bundled application; we have to find
some plausible-looking bundle directory ("OpenMCL.app/") and convince
the window manager that it should allow us to connect to it.  In 0.14,
there's some more jumping-through-hoops required to allow a specified
thread to connect to the window system; by default, only the thread
that loaded some particular shared library has that right.)

Even if we just want to be a faceless Rendezvous server, I think
that it'd be necessary to instantiate an NSApplication and run its
"run" method.  (Yes, it'd be nice to have a sane way of instantiating
arbitrary NSApplications from arbitrary bundle directories and have
all of the hoop-jumping taken care of.)

If I knew more than I do (i.e., next to nothing) about Rendezvous, I
might know whether requiring COCOA instead of just requiring APPLE-OBJC
made things work better.  I'm pretty sure that in both cases calling

(publish *service*)

a second time caused a delegate method to issue a warning, so it would
seem that "setDelegate:" has some effect.

Openmcl-devel mailing list
Openmcl-devel at clozure.com

More information about the Openmcl-devel mailing list