[Squeak-fr] Re: Faire bouger des petits lapins...
Edouard KLEIN
edouard-jo.klein at wanadoo.Fr
Jeu 25 Aou 07:31:29 CEST 2005
Re-Bonjour.
Un petit message avant de partir.
Je m'aperçois que mon message d'hier n'est pas très clair. Voià de
quoi le rendre plus compréhensible :
Quand je tape ça dans un workspace :
rand := Random new initialize.
toto := LapinMorph new initialize:rand.
toto Couleur:'Blanc'.
toto openInWorld.
toto startAnimation
Là, tout se déroule correctement.
Mais si je fais ça :
tab := OrderedCollection new initialize.
20 timesRepeat:[
toto := LapinMorph new initialize:rand.
toto Couleur:'Blanc'.
toto openInWorld.
tab add:toto].
20 timesRepeat:[
tata := rand nextInt: tab size.
unLapin := tab at: tata.
unLapin startAnimation.
].
Alors là, les lapins partent de n'importe où, pour aller n'importe
où, quand ils partent...
Je vais essayer de voir si cela le fait aussi avec la classe
LapinCostume de Dominique Dutoit (merci).
A tout de suite
Edouard
Plus d'informations sur la liste de diffusion Squeak-fr