caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Class Events
@ 2002-01-15 18:37 Warp
  2002-01-15 18:56 ` Remi VANICAT
  0 siblings, 1 reply; 2+ messages in thread
From: Warp @ 2002-01-15 18:37 UTC (permalink / raw)
  To: OCaml

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-01-15 18:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-15 18:37 [Caml-list] Class Events Warp
2002-01-15 18:56 ` Remi VANICAT

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).