caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Re: Glade support
@ 2001-05-18  6:34 Arturo Borquez
  0 siblings, 0 replies; 2+ messages in thread
From: Arturo Borquez @ 2001-05-18  6:34 UTC (permalink / raw)
  To: garrigue; +Cc: caml-list

Hello Jacques,

  I've just downloaded the snapshot and I'll take a look. Some reflections
about the Glade stuff.

On Thu, 17 May 2001, Jacques Garrigue wrote:

> I think we enter here the main difference between using glade with C,
> and using glade with lablgtk. In C, you're not that much expected to
> understand the interface code. As long as you write the code for
> callbacks, this should produce a proper GUI. This is because the
> interface code is lengthy, and you don't want to write it by hand.
> 
> In lablgtk, the interface code is very compact: all the layout only
> requires a function call by widget. You want generated code to be as
> natural as possible, so that you can use it as example to write by
> hand.  And signal binding does not require explicitly defining a
> function: passing it as a closure is often more natural.
> 
> So I would suggest that you do not include any signal stuff inside
> glade_interface.ml, or only for predefined handlers. This would avoid
> a spurious backward dependency between glade_interface.ml and
> glade_signals.ml (which can be avoided by functors or classes, but
> still not very natural).

Yes!!! this is so true. The _main_ difference coding in LablGtk is that you
does not depend on the callbacks structure proposed by Glade (or callbacks in Glade are top functions and the event-driven nature cannot be abstracted) so you
has the choice to design the functional layout of your app. This not only is 
'more natural' style to Caml, but it adds a lot of extra power when dynamic
widget layout is needed and intra-function context callbacks tailoring. I agree Benjamin that Glade is a usefull tool for learning GTK to novices, but for a
skilled programmer 'Glade scheme' imposes programming style restrictions that doesn't pay the rapid visual widget placement. In my personal taste I prefer a
little pain packing the widgets by hand (1 or 2 lines per widget) and then
expand all the power of functional style in favour of expresiveness and elegant
app code, abstracted from the 'visual nature' of the interface.

Best regards
Arturo 


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Caml-list] Re: Glade support
@ 2001-05-16  3:30 Arturo Borquez
  0 siblings, 0 replies; 2+ messages in thread
From: Arturo Borquez @ 2001-05-16  3:30 UTC (permalink / raw)
  To: garrigue; +Cc: caml-list

On Tue, 15 May 2001, Jacques Garrigue wrote:

> 
> Hello Benjamin,
> 
> After second thought, I think your approach can be very useful, and at
> two levels.
> 
> The first one is for beginners: this can help them write their first
> programs, generating the difficult part of the code, before they
> familiarize themselves with lablgtk.
Hello Jacques,
 It is not so clear to me that a Glade GUI builder is so easy to deal with
for beginners. My experience with Glade is that was very easy to pack
widgets and in a few minutes got a form. But dealing with callbacks is a very
different story. The first problem for a novice is to choose the apropriate
signal events (= dive into GTK & GDK docs for a long time) and fill them with
usefull code in order to get the app work right. I could use LablGtk rapidly
only because my prior background gained from working with GTK, but surely it 
was very painfull at the beginning (Gtk). Also Glade as it was designed to be
used with C (in spite its portable XML output) is much more low level than
LablGtk, and I don't know if this XML output is suited to build a high level
callback interface (it seems me not) 'a la par' of LablGtk. Also when you get
some skill with LablGtk is not a big issue designing pretty interfaces and it
don't take so much time and gain a lot of flexibility that is not available
cleanly with Glade callback 'static model'.
Best Regards
Arturo.


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-05-18  6:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-18  6:34 [Caml-list] Re: Glade support Arturo Borquez
  -- strict thread matches above, loose matches on Subject: below --
2001-05-16  3:30 Arturo Borquez

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).