From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA00987 for caml-redistribution; Mon, 31 May 1999 11:50:04 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA26336 for ; Sun, 30 May 1999 21:44:48 +0200 (MET DST) Received: from email.alpcom.it (email.alpcom.it [193.42.134.240]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id VAA10554 for ; Sun, 30 May 1999 21:44:46 +0200 (MET DST) Received: from ubik (pool15-013.dialup.alpcom.it) by ALPCOM.IT (PMDF V5.1-9 #23639) with SMTP id <01JBTLFYWDI8016UKS@ALPCOM.IT> for caml-list@inria.fr; Sun, 30 May 1999 20:45:48 MET Date: Sun, 30 May 1999 21:44:25 +0200 From: Ubik Subject: Events, method iterator In-reply-to: X-Sender: u009731@email.alpcom.it To: caml-list@inria.fr Message-id: <4.1.19990530212605.009311e0@email.alpcom.it> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Pro Version 4.1 Content-type: text/plain; charset="us-ascii" References: <"Your message of Wed, 26 May 1999 14:07:19 +0200." <199905261207.OAA17846@tobago.inria.fr> Sender: weis Hi everybody. I premise: 1) I'm a neophyte about caml 2) I can't speak French, so my mails will be mono-lingual. Now the questions : a) How can i get the value associated with an event (if an event actually "carries" a value ...) ? i tried to send out a function through an int->int->int channel, i receive it from the other side with an int->int->int event, but i can't apply it ... b) Is there a way to iterate a method upon a list of objects of some type ? Suppose i have a hierarchy with many overridden methods, and that i use containers of base-type, like this : class shape = object method virtual paint : unit ... end class circle = object inherit shape method paint = ... ... end ... let paintObject x = x#paint class container = object inherit shape val mutable _objs:shape list = [] method paint = List.iter paintObject _objs ... end I have to define a function for every method to iterate, in this way ? There's no way to define an explicit function to send messages to objects ? Thank you Emiliano