Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] LablGtk
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas FRANCOIS <nicolas.francois@f...>
Subject: Re: [Caml-list] LablGtk
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