<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<div>thank you for your reply</div>I have a class named "PaperBibli" which keeps a list of bibliographic entries.<div>Those entries are of different type: Article, Book, Conference,...</div><div>Every type has its own fields such as: author,title,...</div><div><br></div><div><meta charset="utf-8">&nbsp;--&gt;&nbsp;I created SubClasses of "PaperBibli" for each type so that when I instanciate an bibliographic entry I don't have lots of variables(fields) which are empty because not required in a particular type.</div><div>The problem is that when I instanciate my bibliographic entry I still don't know of which type it is because the user tell me so by choosing in a scroll list.</div><div><br></div><div>I hope that my explanation is clear</div><div><br></div><div><br></div><div><br><br><hr id="stopSpelling">Date: Fri, 29 Oct 2010 12:24:22 -0400<br>Subject: Re: [Seaside] Dynamic typing in smalltalk<br>From: sean@monkeysnatchbanana.com<br>To: seaside@lists.squeakfoundation.org<br><br>There are types in smalltalk.&nbsp;Each object has a type.<div><br></div><div>That aside, what are you trying to accomplish with your example below?</div><div><br></div><div><div><div><br><div class="ecxgmail_quote">On Fri, Oct 29, 2010 at 12:13 PM, Alexandre BP <span dir="ltr">&lt;<a href="mailto:abalonpe@ulb.ac.be">abalonpe@ulb.ac.be</a>&gt;</span> wrote:<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex">



<div>
<br>Hello,<div><br></div><div>I would like to know if it is possible to apply dynamic typing in smalltalk. For example, If I want to use polymorphism, it would be:</div><div><span style="white-space:pre-wrap">        </span></div>
<div><span style="white-space:pre-wrap"> </span>&nbsp;&nbsp; &nbsp; var := Class new.</div><div><span style="white-space:pre-wrap">        </span>var := (SubClass1) message.&nbsp;</div><div><span style="white-space:pre-wrap">        </span>var := (SubClass2) message.</div>
<div><br></div><div>Where message from SubClass1 is different then the one from SubClass2.</div><div>Is there any solution for my problem?&nbsp;</div><div>I know that there is no type in smalltalk but there is definitely a way to use polymorphism right?</div>
<div><br></div><div>Thank you in advance,</div><div>Regards</div><div>alex</div>                                               </div>
<br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br></div></div></div>
<br>_______________________________________________
seaside mailing list
seaside@lists.squeakfoundation.org
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</div>                                               </body>
</html>