<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">As Tim said, TodoItemProto is not a class but a (prototypical) object that is cloned (.copy()) everytime you create a new TodoItem using the + button.<div><br></div><div>How can you find it? Usually [morph].show() will highlight the morph in the work showing red corners. If you do it for this example (this.get('TodoItemProto').show() in the Object Editor), you will see that it must be hidden behind the Progress Bar somewhere.</div><div><br></div><div>Digging further into it by inspecting the morphs and submorphs of the Todo Item Tool, you will find the TodoItemProto as a submorph of the TodoList container (not the window though). It is not visible so it will not be affected by the horizontal layout and you cannot see it.</div><div><br></div><div>How can you find that out programmatically? From the Object Editor, print or inspect this.get('TodoItemProto').owner. :-)</div><div><br><div><span class="Apple-tab-span" style="white-space: pre;"> </span>- Marko</div><div><br></div><div><br><div><div><div>On 13 May 2014, at 07:36, Tim Felgentreff <<a href="mailto:timfelgentreff@gmail.com">timfelgentreff@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div><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></div>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<div 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><div> <br class="webkit-block-placeholder"></div>
<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>
</div>
_______________________________________________<br>lively-kernel mailing list<br><a href="mailto:lively-kernel@hpi.uni-potsdam.de">lively-kernel@hpi.uni-potsdam.de</a><br>http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel<br></blockquote></div><br></div></div></div></body></html>