<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
If I update an instance variable without using a callback or similar block, it will not update, correct? If that is the case, what is a good way to go about accomplishing the same thing without using temporary variables?<div><br></div><div>This works fine:</div><div><div>html form: [</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>html button</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>callback: [self curItem: (self curItem+1). self inform: self curItem.];</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>value: 'Test curItem: method'.</div><div>]</div><div><br></div><div>whereas this does not:</div><div><div>html anchor</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>onClick: (self clickFunction: html onItem: (self resultList at: self curItem));</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>text: 'Next Question'.</div><div><br></div><div><div>clickFunction: html onItem: anItem</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>| itemIndex |</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>itemIndex := self resultList indexOf: anItem.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>((self curItem + 1) &lt;= self resultList size)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>ifTrue: [</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>^</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>(html jQuery: '#',((self resultList at: itemIndex) question)) hide,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>((html jQuery: '#',((self resultList at: itemIndex) question)) effect drop),</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>(html jQuery: '#',((self resultList at: (itemIndex+1)) question)) show,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>((html jQuery: '#',((self resultList at: (itemIndex+1)) question)) effect explode).</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>]</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>ifFalse: [</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>^</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>(html jQuery: '#',((self resultList at: itemIndex) question)) hide,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>((html jQuery: '#',((self resultList at: itemIndex) question)) effect drop)</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>].</div></div></div></div><br /><hr />Insert movie times and more without leaving HotmailŪ. <a href='http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd_062009' target='_new'>See how.</a></body>
</html>