caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Arturo Borquez <aborquez@altavista.com>
To: garrigue@kurims.kyoto-u.ac.jp
Cc: caml-list@inria.fr
Subject: [Caml-list] Re: Glade support
Date: 17 May 2001 23:34:50 -0700	[thread overview]
Message-ID: <20010518063450.19138.cpmta@c012.sfo.cp.net> (raw)

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


             reply	other threads:[~2001-05-18  6:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-18  6:34 Arturo Borquez [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-05-16  3:30 Arturo Borquez

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=20010518063450.19138.cpmta@c012.sfo.cp.net \
    --to=aborquez@altavista.com \
    --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).