Re: Gtk.notebook#append_page and Gtk.frame's ?packing: type mismatch?
Adrien Nader <[email protected]> Sat, 16 Aug 2014 11:03:31 +0200
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Message-ID | <[email protected]> |
Hi,
On Sat, Aug 16, 2014, Alexey Dokuchaev wrote:
> Hi there,
>
> I've been playing with lablgtk2 recently, following the tutorial [1], and it
> looks like it's either old or buggy (leaving aside some whitespace issues),
> and cannot be compiled as is.
>
> GBin.frame's ?packing type is "GObj.widget -> unit", but in this example it
> then calls notebook#append_page which returns int (GObj.widget -> int), and
> thus leading to a type mismatch error. It's not hard to work around, but it
> still looks like a bug to me: could it be that append_page started to return
> int, but no one revisited places where it was also used for ?packing?
>
> ./danfe
>
> [1] http://plus.kaist.ac.kr/~shoh/ocaml/lablgtk2/lablgtk2-tutorial/x1684.html
I've just checked in the commit logs and got this commit:
commit 947604559e4faa81d4f29626f3076073e80870e3
Author: monate <monate@9e25d42d-7a03-43f2-900d-8c2168964d28>
Date: Sat May 26 22:21:52 2007 +0000
notebook#append_page retunr int
Exactly as you supposed.
I have absolutely no idea if anyone can change the tutorial on that
website.
One thing we could maybe do is to re-host it right next to lablgtk's
website and change it there. Then we'd still need to convince google to
update its results (that part is _really_ annoying).
--
Adrien Nader