Version française
Home     About     Download     Resources     Contact us    
Browse thread
Does LablTk have a future?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: yoann padioleau <padator@w...>
Subject: Re: About Lablgtk2 (was: e: GUI for OCaml)
>

David mentre wrote:

> Ok, let's me try to reword my criticism: I find the use of Labgtk2
> objects not easy at all. I find the use of objects and the class
> hierarchy very confusing. Maybe this is just an issue of documenting
> the general mapping of Gtk2 signals, objects, ... to OCaml modules and
> objects. Maybe ocamldoc should be improved to allow unfolding a method
> accessible through the class hierarchy in one class.

Yes, that is a good idea. Some tools offer such a thing, for instance
in Eiffel there is a command "short"  and a command "long"   that
generate documentation from a class,  the first one with only the new  
method, and second
one with all the methods unfolded.


> Or maybe I'm too
> stupid to understand the toolkit. Or maybe I'm unable to grasp OCaml
> objects. The net result is that using Lablgtk2 is really a pain.
>
> However, I do use Labgtk2 for the graphical interface of my
> application so I at least consider that I have written enough code to
> make my own point of view. With all the examples, I'm able to write
> basic interface (i.e. buttons, menus, etc.) through copy/paste.


> But
> I'm still not able to write code that would match GUI design I would
> like to have.

Ok, that is certainly the reason
why we dont have the same feeling about lablgtk,
we must certainly not have the same standard of quality.
I am quite satisfied with someting rudimentary.

>
>
>>> necessary tools (GUI design application) would be very very helpful.
>>>
>>
>> Do you really find useful such RAD tools ?
>>
>
> Yes. Yes and yes. Have you ever programmed a GTk2 application?

Yes, yes, and yes :) (well it was gtk).
A few years ago I programmed one in C++ (I was forced by my school)   
so from this first experience I learned
the toolkit, so maybe this experience was helpful when doing my  
second app with lablgtk
(which was really easier than in c++).


> Have
> you ever see the number of options available for each widget?

No. Well I dont use them most of the time, the optional arguments
and keyword argumentss of olabl (now ocaml3)) is really a big help  
in  that respect.
You dont have to know all the options.


>
> I'm using Glade to produce the XML interface for Labgtk2 (of course,
> callbacks are written in regular OCaml code). It saved me hours of
> interface layout design. I'm not speaking of two buttons into a
> window. I'm speaking of sliding panes, with several buttons, text
> boxes and TreeView in each,

I must admit that my application was not very advanced, but it had  
many different kind of widgets
(buttons, text, boxes, pane, scrollist, menubar, labels, ...)
Here is a screenshot:
   http://lfs.irisa.fr/~pad/LFSWEB/(ext:gif)|(ext:jpg)|(ext:png)/ 
name:lfs-itunes-screenshot0/
Just a light clone of iTunes, the music application of Apple.


> playing with options to make relative
> positioning suits your needs.

The problem from what I remember is that glade fix position, it fix  
the size of your application,
I prefer not to state any fixed position and let the user adjust the  
panes, scrollbar width, ...
In my program I only state constraints (it must be right justified,  
it must be abobe that, ...).
The reason is that I had previously been frustrated by application  
that you can run only in 1024x768, a
applications where you cannot adjust the side of a subwindow, ...

>
> Yours,
> d.
>
>