Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Class Events
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Warp <warplayer@f...>
Subject: [Caml-list] Class Events
Hello, i'm trying to have my class having some event callback like this :

class wmenuitem (fcallback:wmenuitem->unit) =
  object(self)
 val func = fcallback
 method activate = (func self)
  end

but I'm having :

This expression has type < activate : 'a; .. > but is here used with type
  wmenuitem = < .. >
Self type cannot escape its class

Is it really true that self cannot be a parameter ?
Any help ?
Thanks

Warp

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr