Date: Sun, 18 Nov 2001 10:02:52 +0100 From: Sven To: Johann Spies , lablgtk at kaba.or.jp Subject: Re: Newbie questions Message-ID: <20011118100252.A11315 at dpt-info.u-strasbg.fr> References: <20011117144250.A1001 at adept.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20011117144250.A1001 at adept.co.za>; from jhspies at adept.co.za on Sat, Nov 17, 2001 at 02:42:50PM +0200 On Sat, Nov 17, 2001 at 02:42:50PM +0200, Johann Spies wrote: > I am trying to work through the libgtk tutorial. I is not so > easy to know what the lablgtk equivalents for the c-examples > are. > > Trying to figure out the Ocaml equivalent for the "Hello World > 2" example in the tutorial I get the following error which does > not make sense to me: > > js-12:52:07-~$lablgtk -labels > Objective Caml version 3.02 > > # open GMain > ;; > # let window = GWindow.window ~border_width: 100 ();; > val window : GWindow.window = > # let box1 = GPack.hbox ~packing: window#add ();; > val box1 : GPack.box = > # let button = GButton.button ~label:"Hello World" ^^ > # ~packing: box1#add ();; > val button : GButton.button = > # let button2 = Gbutton.button ~label: "Nog een" ^^ > # ~packing: box1#add();; > Unbound value Gbutton.button > > Why this error? How do I add a second button to box1? As you can see, the name of the modules begins with an upercase G and then a word, which itself begins with an upercase letter. You have forgotten to upercase the b of GButton. > BTW is there some sort of Lablgtk tutorial somewhere? It is > real hard to start out with this stuff with no real explanations > to work from. No there isn't, i think at least, altough i think i remember of someone wanting to write such a thing, but don't know who it was and is something ever came of it. Still, if you feel like contributing, you could easily use your early experimentation to write it yourself, and we (well, i at least), will gladly help you out in this. Friendly, Sven Luther