Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Paul Snively <psnively@m...>
Subject: [Caml-list] O'Caml 3.07p2 + Tk 8.4.4 on Mac OS X 10.2.8
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Folks,

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  
<http://caml.inria.fr/archives/200211/msg00163.html>, 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  
<http://www.erlang.org/ml-archive/erlang-questions/200210/ 
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  
resolve.

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

iEYEARECAAYFAj+gA4IACgkQugPBK9DeteqZngCeJ12EsmY8WkHRcSxmJ9xhOzS0
NagAnRgmEbxrsBZJpHwskka3XcW7n1B4
=oj1D
-----END PGP SIGNATURE-----

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners