Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: Random.int 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: -- (:)
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
	...
    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