Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: on non unix platform
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-05-31 (09:50)
From: Ubik <u009731@a...>
Subject: Events, method iterator
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
    class circle = object
	inherit shape
	method paint = ...
    let paintObject x = x#paint

    class container = object
	inherit shape
	val mutable _objs:shape list = []
	method paint = List.iter paintObject _objs
    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