[Squeak-fr] Classe d'une instance
Tancrède Fourmaintraux
squeak-fr@lists.squeakfoundation.org
Thu Jan 16 10:06:02 CET 2003
This is a multi-part message in MIME format.
------=_NextPart_000_000E_01C2BD46.5C2D7AC0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Bonjour,
Ceci est mon premier post sur cette liste, j'ai decouvert squeak il y =
qqs semaines.=20
Mon probl=E8me est le suivant :
Je cr=E9e la classe MyClockMorph : ClockMorph subclass: #MyClockMorph
J'execute le code suivant dans le workspace : Transcript show: =
MyClockMorph new class
et j'obtiens : MyClockMorph
OK je comprends.
Je refaire ce test avec la classe MyMorph : LineMorph subclass: #MyMorph
et le code Transcript show: MyMorph new class donne PolygonMorph
Probleme : pourquoi j'obtiens la classe parent parent de MyMorph? (Je =
n'ai pas surcharge la methode de classe new) Pourquoi j'ai un =
comportement different dans les deux cas?
Je viens du monde java et j'ai l'habitude de travailler avec des objets =
typ=E9s.
Merci de votre aide.
Tancr=E8de
------=_NextPart_000_000E_01C2BD46.5C2D7AC0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2719.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Bonjour,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Ceci est mon premier post sur cette =
liste, j'ai=20
decouvert squeak il y qqs semaines. </FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Mon probl=E8me est le suivant =
:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Je cr=E9e la classe MyClockMorph : =
ClockMorph=20
subclass: #MyClockMorph</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>J'execute le code suivant dans le =
workspace :=20
Transcript show: MyClockMorph new class</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>et j'obtiens : =
MyClockMorph</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>OK je comprends.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Je refaire ce test avec la classe =
MyMorph :=20
LineMorph subclass: #MyMorph</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>et le code Transcript show: MyMorph new =
class donne=20
PolygonMorph</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Probleme : pourquoi j'obtiens la classe =
parent=20
parent de MyMorph? (Je n'ai pas surcharge la methode de classe new) =
Pourquoi=20
j'ai un comportement different dans les deux cas?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Je viens du monde java et j'ai =
l'habitude de=20
travailler avec des objets typ=E9s.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Merci de votre aide.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Tancr=E8de</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV></BODY></HTML>
------=_NextPart_000_000E_01C2BD46.5C2D7AC0--
More information about the Squeak-fr
mailing list