* [Caml-list] O'Caml 3.07p2 + Tk 8.4.4 on Mac OS X 10.2.8
@ 2003-10-29 18:14 Paul Snively
2003-10-29 23:57 ` Jacques Garrigue
0 siblings, 1 reply; 2+ messages in thread
From: Paul Snively @ 2003-10-29 18:14 UTC (permalink / raw)
To: caml-list
-----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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] O'Caml 3.07p2 + Tk 8.4.4 on Mac OS X 10.2.8
2003-10-29 18:14 [Caml-list] O'Caml 3.07p2 + Tk 8.4.4 on Mac OS X 10.2.8 Paul Snively
@ 2003-10-29 23:57 ` Jacques Garrigue
0 siblings, 0 replies; 2+ messages in thread
From: Jacques Garrigue @ 2003-10-29 23:57 UTC (permalink / raw)
To: psnively; +Cc: caml-list
From: Paul Snively <psnively@mac.com>
> 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:
IIRC, you can shorten it a bit when the framework is in a standard
location:
./configure -tkdefs "-I/Library/Frameworks/Tcl.framework/Headers
-I/Library/Frameworks/Tk.framework/Headers" -tk-no-x11
-tklibs "-framework Tcl -framework Tk"
Not that this changes much :-)
However, my experience with the Aqua Tk is lots of strange behaviour,
so my suggestion would be to do yourself a favor, and install the X11
Tk, which works flawlessly. Not also that lablGL's Togl widget works
only with the X11 Tk (as Togl does not support Aqua Tk to start with).
> 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.
Interesting. I'll take a look at this, but your following comments
about strange behaviours with ocamlbrowser confirm that it's probably
not worth investing too much time in it.
By the way, isn't anybody working on a direct interface to Aqua, to be
able to write Aqua application ocaml? This would be much nicer than a
half-baked Tk interface. Is GNUstep compatible enough to offer some
kind of portability?
Jacques Garrigue
-------------------
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-10-29 23:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-29 18:14 [Caml-list] O'Caml 3.07p2 + Tk 8.4.4 on Mac OS X 10.2.8 Paul Snively
2003-10-29 23:57 ` Jacques Garrigue
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox