caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Aqua ocamlbrowser on Mac OS X
@ 2004-02-06 19:11 Shivkumar Chandrasekaran
  2004-02-06 19:29 ` Shivkumar Chandrasekaran
  2004-02-06 21:00 ` [Caml-list] " Trevor Jim
  0 siblings, 2 replies; 3+ messages in thread
From: Shivkumar Chandrasekaran @ 2004-02-06 19:11 UTC (permalink / raw)
  To: caml-list; +Cc: trevor

Following Trevor's suggestions (see 
http://caml.inria.fr/archives/200211/msg00163.html) I am now able to 
get *my* labltk programs to run in native Mac OS X Aqua mode (using 
TclTkAquaBI-8.4.5.0.dmg from 
http://www.maths.mq.edu.au/~steffen/tcltk/TclTkAqua/). Thanks, Trevor!!

What follows is what I did to get ocamlbrowser to run as a native Aqua 
app. First I followed Trevor's suggestions. That did not work if I 
double-clicked on Ocamlbroswer.app. I then tried from the command line

open -a Ocamlbrowser

That at least let ocamlbrowser display its error message that the 
options to the command line were at fault. All the Console showed in 
the log was a dreaded "RegisterProcess failed (error -50)" message.

So I edited the source file ..../otherlibs/labltk/browser/main.ml and 
essentially commented out the command line argument parsing step. I did 
"make" and moved the new binary into OCamlbrowser.app/Contents/MacOS/ 
and everything works pretty nicely now. The only problem I have noticed 
is that clicking in the scroll bar does not work. You have to catch the 
scroll-button and move it with the mouse. Everything else seems to work 
too.

If somebody needs the modified source I can email it. I hope some 
similar hack can make labltk work too.

To make this complete we must find some way of passing the command line 
options, but that is for somebody else to do.

--shiv--


> I managed to get labltk working in Mac OS 10 with the Aqua (non-X)
> version of Tk.  It's a bit clunky but maybe someone who knows more
> about these things can clean it up.

-------------------
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] 3+ messages in thread

* Re: [Caml-list] Aqua ocamlbrowser on Mac OS X
  2004-02-06 19:11 [Caml-list] Aqua ocamlbrowser on Mac OS X Shivkumar Chandrasekaran
@ 2004-02-06 19:29 ` Shivkumar Chandrasekaran
  2004-02-06 21:00 ` [Caml-list] " Trevor Jim
  1 sibling, 0 replies; 3+ messages in thread
From: Shivkumar Chandrasekaran @ 2004-02-06 19:29 UTC (permalink / raw)
  To: caml-list

I should add that I can still only get it to run from the Terminal via

open -a Ocamlbrowser

--shiv--

On Feb 6, 2004, at 11:11 AM, Shivkumar Chandrasekaran wrote:

> Following Trevor's suggestions (see 
> http://caml.inria.fr/archives/200211/msg00163.html) I am now able to 
> get *my* labltk programs to run in native Mac OS X Aqua mode (using 
> TclTkAquaBI-8.4.5.0.dmg from 
> http://www.maths.mq.edu.au/~steffen/tcltk/TclTkAqua/). Thanks, 
> Trevor!!
>
> What follows is what I did to get ocamlbrowser to run as a native Aqua 
> app. First I followed Trevor's suggestions. That did not work if I 
> double-clicked on Ocamlbroswer.app. I then tried from the command line
>
> open -a Ocamlbrowser
>
> That at least let ocamlbrowser display its error message that the 
> options to the command line were at fault. All the Console showed in 
> the log was a dreaded "RegisterProcess failed (error -50)" message.
>
> So I edited the source file ..../otherlibs/labltk/browser/main.ml and 
> essentially commented out the command line argument parsing step. I 
> did "make" and moved the new binary into 
> OCamlbrowser.app/Contents/MacOS/ and everything works pretty nicely 
> now. The only problem I have noticed is that clicking in the scroll 
> bar does not work. You have to catch the scroll-button and move it 
> with the mouse. Everything else seems to work too.
>
> If somebody needs the modified source I can email it. I hope some 
> similar hack can make labltk work too.
>
> To make this complete we must find some way of passing the command 
> line options, but that is for somebody else to do.
>
> --shiv--
>
>
>> I managed to get labltk working in Mac OS 10 with the Aqua (non-X)
>> version of Tk.  It's a bit clunky but maybe someone who knows more
>> about these things can clean it up.
>
> -------------------
> 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

-------------------
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] 3+ messages in thread

* [Caml-list] Re: Aqua ocamlbrowser on Mac OS X
  2004-02-06 19:11 [Caml-list] Aqua ocamlbrowser on Mac OS X Shivkumar Chandrasekaran
  2004-02-06 19:29 ` Shivkumar Chandrasekaran
@ 2004-02-06 21:00 ` Trevor Jim
  1 sibling, 0 replies; 3+ messages in thread
From: Trevor Jim @ 2004-02-06 21:00 UTC (permalink / raw)
  To: Shivkumar Chandrasekaran; +Cc: caml-list

I debugged the following when getting a version of Unison running in 
Aqua:

     /* When you click-start or use the open command, the program is 
invoked with
        a command-line arg of the form -psn_XXXXXXXXX.  The XXXXXXXX is 
a "process
        serial number" and it seems to be important for Carbon programs. 
  We need
        to get rid of it if it's there so the ocaml code won't exit.  
Note, the
        extra arg is not added if the binary is invoked directly from 
the command
        line without using the open command. */
     if (argc == 2 && strncmp(argv[1],"-psn_",5) == 0) {
         argc--;
         argv[1] = NULL;
     }

I just put that in main before calling caml.  (I am calling caml from 
ObjC.)

-Trevor

On Friday, February 6, 2004, at 02:11  PM, Shivkumar Chandrasekaran 
wrote:

> did not work if I double-clicked on Ocamlbroswer.app. I then tried 
> from the command line
>
> open -a Ocamlbrowser
>
> That at least let ocamlbrowser display its error message that the 
> options to the command line were at fault. All the Console showed in 
> the log was a dreaded "RegisterProcess failed (error -50)" message.
>
> So I edited the source file ..../otherlibs/labltk/browser/main.ml and 
> essentially commented out the command line argument parsing step. I 
> did "make" and moved the new binary into 
> OCamlbrowser.app/Contents/MacOS/ and everything works pretty nicely 
> now.

-------------------
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] 3+ messages in thread

end of thread, other threads:[~2004-02-06 21:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-06 19:11 [Caml-list] Aqua ocamlbrowser on Mac OS X Shivkumar Chandrasekaran
2004-02-06 19:29 ` Shivkumar Chandrasekaran
2004-02-06 21:00 ` [Caml-list] " Trevor Jim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).