caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
To: jspies@sun.ac.za
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] LablGtk
Date: Fri, 22 Feb 2002 18:14:29 +0900	[thread overview]
Message-ID: <20020222181429X.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <20020222081012.GD19387@adept.co.za>

> > this one, I think), is there ANY way to find help on this package ?
> > Either documentation, or examples of small applications written in
> > LablGtk
> 
> I have the same problem: I want to see how thing are handled in
> LablGtk.  I recently searched for an example of a notebook in LablGtk
> but could not find one.

Here it is, as an example of interactive session using the threaded
toplevel. I just looked at the types with OCamlBrowser, and did the
"evident" thing.

# let w = GWindow.window ~show:true ();;
val w : GWindow.window = <obj>
# let nb = GPack.notebook ~packing:w#add ();;
val nb : GPack.notebook = <obj>
# let p1 =GEdit.text ~editable:true
  ~packing:(nb#append_page ~tab_label:(GMisc.label ~text:"Text" ())#coerce
            ~menu_label:(GMisc.label ~text:"Text" ())#coerce) ();;
val p1 : GEdit.text = <obj>
# let p2 = GButton.button ~label:"Hello world!"
  ~packing:(nb#append_page ~tab_label:(GMisc.label ~text:"Button" ())#coerce
             ~menu_label:(GMisc.label ~text:"Button" ())#coerce) ();;
val p2 : GButton.button = <obj>

This is not too say that you didn't search enough. In fact it may take
a while to get used to the basic concepts of typeful programming: look
for the function with the right type.
In the ideal, lablgtk is just intended to work as GTK+true types.

> I know it is not practical to rewrite the libgtk-manual, but it would
> be nice to see what the ocaml-equivalent is for the c examples.

Maybe we could try to translate all the examples in the GTK
tutorial. A large part of them was translated by Hubert Fauque in
testgtk.ml, but I have not got contributed examples for a while. In
fact it can be a good training for beginners :-)

> There is in my opinion a good example on how this can be done: the
> wxPython manual which illustrates the python-specific way of handling
> things without duplicating the rest of the wxWindows manual.

Can you give me a URL ?
I've got a look at the wxPyton online tutorial, but except for using
HTML it didn't strike me as much more informative than the short but
dense lablgtk README. Note also that Python doesn't have types.
 
> Unfortunately I don't have the necessary knowledge to write such a
> lablgtk-manual :(

What about writing a FAQ. If you have questions without answers, I or
others on the lablgtk list may fill them.

Cheers,

Jacques Garrigue
-------------------
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


  reply	other threads:[~2002-02-22  9:14 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       ` [Caml-list] LablGtk Nicolas FRANCOIS
2002-02-22 14:45       ` 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 [this message]
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=20020222181429X.garrigue@kurims.kyoto-u.ac.jp \
    --to=garrigue@kurims.kyoto-u.ac.jp \
    --cc=caml-list@inria.fr \
    --cc=jspies@sun.ac.za \
    /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).