caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Adrien Nader <adrien@notk.org>
To: Oliver Bandel <oliver@first.in-berlin.de>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] lablgtk with OCamlMakefile
Date: Thu, 31 Jul 2014 10:48:34 +0200	[thread overview]
Message-ID: <20140731084834.GB12684@notk.org> (raw)
In-Reply-To: <20140723134245.Horde.4I1V6EjmlCCX20bk_Xmh1Q2@webmail.in-berlin.de>

On Wed, Jul 23, 2014, Oliver Bandel wrote:
> I again use  "lablgtk2" (instead of "lablgtk2.auto-init")
> in the "PACKS"-section of my Makefile.
> 
> And I added the line
> 
>   let locale = GtkMain.Main.init () in
> 
> as first line in my GUI-code.
> 
> 
> Doing it this way, it also works; I get a GUI instead of a crash.
> 
> I hope this is the correct and recommended way now.

Yes, it's perfect. Just for completeness for archives: this changes very
slightly when multi-threading is required (and also remember that
graphics-related operations can only happen in the main thread on
most platforms but X11 (Wayland too?) and that even in that case, the
GDK lock must be taken before issuing them.
(more details are easily found on the internet)

> Remark on the README-file:
> 
> The line with "GtkMain.Main.init ()" I found in the
> README of lablgtk, which you seemed to refer to.
> 
> Normally this README is not seen, because when installing
> the lablgtk-package, it will just be the working code become installed,
> and the README does not show up.
> 
> Possibly it makes sense to have doc-packages, which install
> the documentation also.
> (It's on Arch-linux, and no docs are installed by default.)

Yes, right. There's
http://lablgtk.forge.ocamlcore.org/README.html#_how_to_compile_and_link
which should be more visible but still not as well as it should.

I've been unable to keep up with my TODO list in the recent months but
I'll soon have 2 * 4 hours of plane so I'll try to use that to commit
improvements to the documentation and beginner material. Unfortunately,
until then I won't have time to make such changes.

-- 
Adrien Nader

      parent reply	other threads:[~2014-07-31  8:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-22 23:45 Oliver Bandel
2014-07-23  0:01 ` Markus Mottl
2014-07-23  0:47   ` Oliver Bandel
2014-07-23 11:10   ` Adrien Nader
2014-07-23 11:42     ` Oliver Bandel
2014-07-23 12:34       ` Markus Mottl
2014-07-31  8:43         ` Adrien Nader
2014-07-31  8:48       ` Adrien Nader [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140731084834.GB12684@notk.org \
    --to=adrien@notk.org \
    --cc=caml-list@inria.fr \
    --cc=oliver@first.in-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).