Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] O'Caml 3.07p2 + Tk 8.4.4 on Mac OS X 10.2.8
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-10-29 (18:14)
From: Paul Snively <psnively@m...>
Subject: [Caml-list] O'Caml 3.07p2 + Tk 8.4.4 on Mac OS X 10.2.8
Hash: SHA1


First, thanks for all the great, hard work on Objective Caml. It's a  
real joy to program in.

I wish to be able to use the Aqua version of Tk, so of course, I had to  
compile the sources following the instructions at  
<>, specifically:

"In the ocaml source directory do

    ./configure -tkdefs "-I/Library/Frameworks/Tcl.framework/Headers
- -I/Library/Frameworks/Tk.framework/Headers" -tk-no-x11 -tklibs
"-F/Library/Frameworks/Tcl.framework -framework Tcl
- -F/Library/Frameworks/Tk.framework -framework Tk"

    make world
    make opt
    sudo make install
    make clean"

And this worked flawlessly. However, I immediately ran into the:

"you will get an error message

    SetFrontProcess failed,-606

when you try to use the calculator."

Sure enough. Since I didn't feel it was realistic or even necessarily  
desirable to create a Mac OS X app bundle for every Tk-using  
command-line tool, I set about to see if there was another solution to  
the problem. It turns out that there is, and it is described quite  
nicely at  
msg00148.html>. Briefly, Tk's SetFrontProcess() call needs to be  
prepended with a CPSSetProcessName() and CPSEnableForegroundOperation()  
pair. This change is controversial, which is probably why it's not in  
the current Tk builds: those calls are undocumented and in fact have  
been replaced with a public API in Mac OS X 10.3. However, this patch  
is still important for those running pre-10.3 Mac OS X.

This gets me to the point where "ocamlbrowser" brings up the browser,  
and I can successfully bring it to the front and perform most  
operations. However, whenever I click either in the scrollbar arrows or  
in the page up/down portion of the scrollbar, I get: Uncaught  
exception: Invalid_argument("TKtoCAMLscrollValue"). Also, attempting to  
quit ocamlbrowser using either of the menus (the Application menu or  
the File menu) causes a hang of indefinite duration, requiring a "force  
quit" eventually.

If any other O'Caml aficionados are also struggling to get O'Caml and  
Aqua Tk working together properly, I'd be most interested in joining  
forces. Hopefully it's clear that some good progress has been made, but  
there are just a few weird outstanding issues that it would be nice to  

Many thanks and best regards,
Paul Snively
Version: GnuPG v1.2.3 (Darwin)


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: