<div dir="ltr"><div class="gmail_default" style="color:rgb(51,51,255)"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">hi there,</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">i have a question about squeak object model.</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">how can i check whether a method contains a certain piece of code?</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">i.e if the method &quot;isKindOf:&quot; has the code &quot;class inheritsFrom&quot; - return true, otherwise - return false (in this case, isKindOf indeed has that code, so i expect to get true).</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">obviously if i know the class+method, than i can check the code in the Browser, but how can i perform this check at runtime when the class+methods are given as an input?</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">if the class is represented as aClass, the method is represented as aMethod, and the code to check is: &#39;check if this code exist&#39;,  than i guess the start would be:</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">checkClass: aClass andMethod: aMethod</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">     aClass respondsTo: aMethod</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">          ifTrue: [ ^ hmmmmm hasCode: &#39;check if this code exist&#39;  ]</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">          ifFalse: [ ^ false ]</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">but what should i actually check in the ifTrue block?</span></div>
<div class="gmail_default"><font color="#000000">i need to be able to check this by code, and not with the refactoring browser.</font><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">sorry for the (very) long question.</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">thanks,</span><br style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">
<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13.333333969116211px;line-height:20px">dvir.</span><br></div></div>