[Lablgtk] Type annotation (obviously) needed...

Jacques Garrigue garrigue at math.nagoya-u.ac.jp
Sun Dec 12 07:29:26 CET 2010

As a general rule, when you call a method or do a coercion on a widget,
its type should be known through an annotation. 
(Of course, this is not needed in all cases, but when you get this kind
of hard to understand error message, this is usually the case).

Here the easiest point to annotate is in init_one:

  let init_one (msg, trvw, store, col : _ * GTree.view * GTree.list_store * _) =

This appears to be sufficient to solve your problem.


On 2010/12/07, at 15:54, Serge Le Huitouze wrote:

> Hi there,
> I have a compilation error while compiling the attached program
> [The command line is included at the beginning of the file.
> In order to simplify compilation, I've inlined the glade-generated
> code. Caution however: you still need the glade file to run the
> program].
> The important part of the error message (I reproduce the complete
> error message at the end of this email, but it's probably not
> necessary for you, experts) goes like this:
> * The universal variable 'e would escape its scope
> If I comment out lines containing "store#append" and "store#set"
> in function "indirect_way" (lines #82 and #83), I have no problem.
> Also, note that similar calls in "direct_way" pose no compilation
> problem.
> So my problem obviously has to do with type wizardry, and a
> type annotation should do the trick.
> But I've no clue as what (and where) this annotation should be!
> Can someone help me?
> Thanks in advance.

Lablgtk mailing list
Lablgtk at yquem.inria.fr

More information about the Lablgtk-list mailing list