<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body><div><div style="font-family:Calibri,sans-serif;font-size:11pt">The TodoItemProto in this example isn't a class. It's the name of a morph somewhere in the world. Finding it's class won't be useful.</div>
</div><div dir="ltr"><hr><span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">From: </span><span style="font-family:Calibri,sans-serif;font-size:11pt"><a href="mailto:carlos.crosetti@afilha.com.ar">Carlos Crosetti</a></span><br>
<span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">Sent: </span><span style="font-family:Calibri,sans-serif;font-size:11pt">13/05/2014 01:55</span><br><span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">To: </span><span style="font-family:Calibri,sans-serif;font-size:11pt"><a href="mailto:lively-kernel@hpi.uni-potsdam.de">lively-kernel@hpi.uni-potsdam.de</a></span><br>
<span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">Subject: </span><span style="font-family:Calibri,sans-serif;font-size:11pt">Re: [lively-kernel] finding a class</span><br><br></div></body></html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks Lars, the programmatic method you explained is very useful.
However I was interested in a manual method to find a class. either
in the System Code Browser or thru the world menu<br>
<br>
<div class="moz-cite-prefix">On 05/12/2014 03:31 PM, Lars wrote:<br>
</div>
<blockquote cite="mid:CAHQQ6OXQBaVgFQ1V=EbML8OY6Gwdg+bhZWJqA4k2rbZM+RxVBw@mail.gmail.com" type="cite">
<div dir="ltr">Hello Carlos,
<div>in oder to get to the TodoItemProto class, just ask the
morph for its constructor. When printed, that gives you the
class' name. If you want to know where the class is from, ask
the constructor for it's source module:</div>
<div><br>
</div>
<div>var klass = this.get("TodoItemProto").constructor</div>
<div>var source =
this.get("TodoItemProto").constructor.sourceModule</div>
<div><br>
</div>
<div>Methods defined using the lively class scheme have an
attribute "declaredClass" which contains a string which should
yield the class object upon evaluation.</div>
<div><br>
</div>
<div>Lars</div>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On 12 May 2014 11:08, <span dir="ltr"><<a href="mailto:carlos.crosetti@afilha.com.ar" target="_blank">carlos.crosetti@afilha.com.ar</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="font-family:Verdana,Geneva,sans-serif">
<p>Hi, I am familiar with Smalltalk and teaching myself
the Lively Kernel. While browsing the TodoList via
object editor I sea fragment of code like this</p>
<p>var item = this.get("TodoItemProto").copy();</p>
<p><br>
How do I find the TodoItemProto class? Is there a way to
select the class name from a method and jump to the
class browser open in that target class?</p>
<p>Regards, Carlos</p>
<p> </p>
<div> </div>
</div>
<br>
_______________________________________________<br>
lively-kernel mailing list<br>
<a href="mailto:lively-kernel@hpi.uni-potsdam.de">lively-kernel@hpi.uni-potsdam.de</a><br>
<a href="http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel" target="_blank">http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>