<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://workspace.onionmixer.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Smalltalk_Tips</id>
	<title>Smalltalk Tips - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://workspace.onionmixer.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Smalltalk_Tips"/>
	<link rel="alternate" type="text/html" href="https://workspace.onionmixer.net/wiki/index.php?title=Smalltalk_Tips&amp;action=history"/>
	<updated>2026-05-07T17:12:39Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://workspace.onionmixer.net/wiki/index.php?title=Smalltalk_Tips&amp;diff=200&amp;oldid=prev</id>
		<title>Onionmixer: /* 내용 */</title>
		<link rel="alternate" type="text/html" href="https://workspace.onionmixer.net/wiki/index.php?title=Smalltalk_Tips&amp;diff=200&amp;oldid=prev"/>
		<updated>2013-02-21T16:52:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;내용&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;;Smalltalk Tips&lt;br /&gt;
&lt;br /&gt;
==객체의 클래스를 알고싶을때==&lt;br /&gt;
&lt;br /&gt;
===내용===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;smalltalk&amp;quot;&amp;gt;&lt;br /&gt;
3 class. &amp;lt;- 영역선택후 Print it 진행&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
이렇게 하면 SmallInteger가 나온다&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
정작 하고싶은건 factorial의 class를 알고싶었던건데 안나온다.&lt;br /&gt;
&lt;br /&gt;
그래서 Finder에서 factorial을 찾았더니 selector로 나오네. 그럼 이건 class가 아니라 method라는 의미.&lt;br /&gt;
&lt;br /&gt;
찾아보니 SmallInteger의 부모class인 Integer의 method(selector)였다.&lt;br /&gt;
&lt;br /&gt;
그러니 class를 찾아도 안나오지.... factorial은 class가 아니라 selector니까...&lt;br /&gt;
&lt;br /&gt;
===참고자료===&lt;br /&gt;
&lt;br /&gt;
* http://w.nya.kr/doku.php?id=%EA%B0%9C%EB%B0%9C:%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D_%EC%96%B8%EC%96%B4:smalltalk:%EA%B0%9D%EC%B2%B4 &amp;lt;- 유용하심.&lt;br /&gt;
* http://ta.onionmixer.net/wordpress/?p=146 &amp;lt;- 이 내용을 가지고 정리해놓은글&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==smalltalk에서는 error의 return도 객체다==&lt;br /&gt;
&lt;br /&gt;
===참고자료===&lt;br /&gt;
&lt;br /&gt;
* http://blog.naver.com/PostView.nhn?blogId=daliot&amp;amp;logNo=120034678025&amp;amp;redirect=Dlog&amp;amp;widgetTypeCall=true &amp;lt;- 달룟님의 적나라한글.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==block을 이용한 인자의 처리에 대한 Transcript와 string출력==&lt;br /&gt;
&lt;br /&gt;
===내용===&lt;br /&gt;
&lt;br /&gt;
실제로 이렇게까지 쓸일은 없지만..... 객체의 동작을 테스트한다는점에서는 한줄로 보는 쓸모있는 예제가 되지 않을까 싶다&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;smalltalk&amp;quot;&amp;gt;&lt;br /&gt;
Transcript show: ([:x :y :aa :cc | x + y + ( aa * cc ) ] value: 1 value: 2 value: 3 value:4) printString.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
블록으로 4개의 value를 받아서 연산한 결과를 string출력으로 보낸다음 그걸 Transcript의 show라는 셀렉터에 인수로 전달... 정도의 내용 되시겠다. 실제로 이렇게 쓸일은 없겠지...-.-;&lt;br /&gt;
&lt;br /&gt;
주의할점이 하나 있다면 블록 전체를 ()로 감싼다음 printString을 먹여줘야한다는거. 연산식만 쓰는경우에는 상관이 없는데 이게 블록식 자체가 인수로 전달되어야 하다보니 3 printString같은상황이 되도록 깔끔하게 정리를 해줘야하는 모양.&lt;br /&gt;
&lt;br /&gt;
===참고자료===&lt;br /&gt;
&lt;br /&gt;
* http://trans.onionmixer.net/mediawiki/index.php?title=SqueakByExample:3.5 예제가 여기에 있다.&lt;/div&gt;</summary>
		<author><name>Onionmixer</name></author>
	</entry>
</feed>