caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Nicolas FRANCOIS (AKA El Bofo) <nicolas.francois@free.fr>
To: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] LablGtk
Date: Fri, 22 Feb 2002 14:26:36 +0100	[thread overview]
Message-ID: <20020222142636.0c78f64b.nicolas.francois@free.fr> (raw)
In-Reply-To: <20020222121139J.garrigue@kurims.kyoto-u.ac.jp>

On Fri, 22 Feb 2002 12:11:39 +0900
Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp> wrote:

> From: Nicolas FRANCOIS (AKA El Bofo) <nicolas.francois@free.fr>
> > Yes. I know this. What I am looking for is REAL documentation. For
> > example, I was not able to find out how to send a signal (just to let
> > my drawing area know that it has to redraw itself, for example).
> 
> OK, I thought you were talking about receiving signals.
> The more precise the question, the better the answer.
> Actually, there is very little support for explicitly sending signals.
> You have to go directly for GtkSignal.emit_unit and its friends.
> The signals themselves are in the Gtk*.*.Signals submodules.
> However, in your case here, you should rather call #misc#draw
>          w#misc#draw (Some (Gdk.Rectangle.create 10 10 20 20))
>       or w#misc#draw None

I'll check this. Anyway, I found another solution. My problem was that I
had to create a variable "drawing" like this :

let drawing = new GDraw.drawable (self#fenetre#area#misc#window)

after a call to self#fenetre#area#misc#realize (can't figure out what this
is for. Creating space on the screen for this widget ? Is it necessary for
variable drawing ? ...). 

> As for documentation, the only formal documentation is the README
> file, which tries to tell you where is what, but not really how to use
> it. One problem is that I have no idea what a real documentation
> should include, without ducplicating GTK's own documentation, which is
> huge. Probably more details about signals ?
> Some people where working on a tutorial. Is there some progress?

The problem with Gtk is that I don't have a good technical documentation,
giving the inheritance tree, the complete methods list, and simple canvas
to realize basic apps. And not all this f...g mess with casting everywhere
and trying to let you think you're doing object programmation ! Well,
maybe I didn't find the good book. Linux Mag (France) articles are
usefull, but not enough, and the translation to LablGtk (introducing it's
own hierarchy, not that I complain about it) is not obvious. I really
don't know if I need to understand deeply Gtk, or if I'd better learn the
entire G[A-Z]* structure to use the lib'. 
> > I noticed some sarcasm in your "(strangely named)". Beware, Klingons
> > don't share Human's sense of humour. Grrr.
> 
> I was just pointing that, in the absence of documentation, examples
> can help a lot. But they could be better organized, and it appears
> that what you were looking for was not there.

Well, you can't imagine how many examples I studied before asking my
questions. But you're right in one way : usually, just after writing a
message begging for help, I find a solution ;-) Can't stand it, but it
helps a lot to complain on some list. I just chose Caml List because there
is more traffic than on LablGtk. The proof is that you answered a message
of mine at about 4 AM (in France). This is quite good news at the right
moment ! So, thnaks a lot, and don't think it's time wasting helping
people by recalling them to explore docs and examples ;-) 
> > > We have also some small applications, but they were not released
> > > until now out of laziness to package them.
> > 
> > NOthing about signals in the apps dir, I already checked this.
> 
> The above sentence means that it is _not_ there. I've actually written
> such a paint application in the past, and was thinking of including it
> if it can help anybody. The trouble is that it is entangled with other
> code, as part of a bigger project.

There will be another one soon : Drgeocaml. I just created a sourceforge
porject about it. If you're interested, just let me know. 
> > Really, you can't imagine the number of lines of code I read before
> > asking. And I intensively used OCamlBrowser on LablGtk installation,
> > but this is simply too much for me. I know GUI programming in Qt (and
> > some others), I hate Gtk for overfeeding casting, so I thought LablGtk
> > would be the solution. But I failed. Bouhou !
> 
> I know, GTK is far from ideal. But it's still the easiest thing to
> interface with, after Tcl/Tk. Qt is so tightly bound to C++.

Yes, but the structure of Qt is obvious, which Gtk is very very far from.
Don't understand the problem of you people with C++. Is it really so weird
?

Anyway, and again, many thanks, friend.

\bye

-- 

                   Nicolas FRANCOIS
            http://nicolas.francois.free.fr
 A TRUE Klingon programmer does NOT comment his code
-------------------
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


  parent reply	other threads:[~2002-02-22 13:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-21 22:10 Nicolas FRANCOIS
2002-02-21 23:34 ` Jacques Garrigue
2002-02-22  2:41   ` Nicolas FRANCOIS
2002-02-22  3:11     ` Jacques Garrigue
2002-02-22 12:55       ` QT Bindings [Was: Re: [Caml-list] LablGtk] Stefano Zacchiroli
2002-02-23  7:37         ` Sven
2002-02-23  7:44           ` Henrik Motakef
2002-02-22 13:26       ` Nicolas FRANCOIS [this message]
2002-02-22 14:45       ` [Caml-list] LablGtk Nicolas FRANCOIS
2002-02-22 15:03         ` Nicolas FRANCOIS
2002-02-23 15:20         ` [Caml-list] LablGtk : found the solution :-P Nicolas FRANCOIS
2002-02-22  8:10 ` [Caml-list] LablGtk Johann Spies
2002-02-22  9:14   ` Jacques Garrigue
2002-02-22 12:37     ` Johann Spies
2002-02-22 13:09       ` Jacques Garrigue
2002-02-22 14:35         ` Johann Spies
2002-02-22  9:08 ` Maxence Guesdon
2002-02-23  2:40   ` Nicolas FRANCOIS

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=20020222142636.0c78f64b.nicolas.francois@free.fr \
    --to=nicolas.francois@free.fr \
    --cc=caml-list@inria.fr \
    --cc=garrigue@kurims.kyoto-u.ac.jp \
    /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).