<div dir="ltr"><div class="gmail_quote"><div>Thanks James for the response and welcome! :)<br><br>I went back to the #callback: style and used #setFocus in both methods for testing.&nbsp; With &quot;...html textInput setFocus;....&quot; present in both methods I know longer get a stack trace, but the focus ends up on the last receiver.&nbsp; So definitely has something to do with #setFocus not being present.&nbsp; I then re-wrote the methods using #on:of: style (see below), with #setFocus present in both, one or neither of the methods. It worked in all 3 scenarios and there are no cascades present.<br>
<br><span style="font-family: courier new,monospace;">renderCompanyTextInputOn: html</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; self </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; renderLabel: &#39;Company Name: &#39;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; input: [</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; html textInput on: #companyName of: self headDataModelView]</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; output: self headDataModelView companyName</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; on: html.</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">renderEmployeeTextInputOn: html</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; self </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; renderLabel: &#39;Employee Name: &#39;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; input: [</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; html textInput setFocus on: #employeeName of: self headDataModelView]</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; output: self headDataModelView employeeName</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; on: html.<br>
<br><span style="font-family: arial,helvetica,sans-serif;">The Seaside examples, which I used as references, can be found in Seaside-Tests-Functional WAInputElementContainer&gt;&gt;renderTextInputOn:, WAInputElementContainer&gt;&gt;renderTextInputExampleOn: etc. but these work.<br>
<br>Anyway, I will move forward using the #on:of: as these work and appear to achieve the same as the #callback: method.<br><br>Thanks for the help.<br><br>Regards<br>Adrian<br></span></span>&nbsp; &nbsp; <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Message: 7<br>
Date: Sat, 30 Aug 2008 22:05:41 +0200<br>
From: James Foster &lt;Smalltalk@JGFoster.net&gt;<br>
Subject: Re: [Seaside] Newbie question<br>
To: Seaside - general discussion &lt;<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>&gt;<br>
Message-ID: &lt;B7D0654B-53B8-4A3C-B213-7691536A8825@JGFoster.net&gt;<br>
Content-Type: text/plain; charset=&quot;us-ascii&quot;<br>
<br>
Hi Adrian,<br>
<br>
I haven&#39;t tried your code myself, but a brief visual scan suggests at<br>
least one problem that I&#39;ve identified below...<br>
<br>
On Aug 30, 2008, at 9:32 PM, r00t uk wrote:<br>
<br>
&gt; Hello All<br>
&gt;<br>
&gt; I am slowly working my way through Squeak and Seaside using &quot;An<br>
&gt; Introduction to Seaside&quot; and the Seaside examples as my learning<br>
&gt; guides. &nbsp;I have come across an issue which I don&#39;t understand, and I<br>
&gt; am hoping someone could enlighten me as to what is going wrong. &nbsp;The<br>
&gt; two methods below are called by<br>
&gt; MLHeadDataModelView&gt;&gt;renderContentOn:, &nbsp;with<br>
&gt; MLHeadDataModelView&gt;&gt;renderCompanyTextInputOn: resulting in a<br>
&gt; MessageNotUnderstood: WARenderCanvas&gt;&gt;value: error.<br>
&gt;<br>
&gt; The instance methods are:<br>
&gt;<br>
&gt; MLHeadDataModelView&gt;&gt;renderCompanyTextInputOn: &quot;This method<br>
&gt; generates the &#39;MessageNotUnderstood: WARenderCanvas&gt;&gt;value:&#39; error&quot;<br>
&gt; self<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; renderLabel: &#39;Company Name: &#39;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; input: [<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; html textInput;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: self headDataModelView companyName;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; callback: [:value | self headDataModelView companyName:<br>
&gt; value]]<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; output: self headDataModelView companyName<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; on: html.<br>
&gt;<br>
&gt; MLHeadDataModelView&gt;&gt;renderEmployeeTextInputOn:<br>
&gt; self<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; renderLabel: &#39;Employee Name: &#39;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; input: [<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; html textInput setFocus;<br>
<br>
In Smalltalk the semantics of a cascade (indicated by the semi-colon)<br>
means that the following #value: message is being sent to the receiver<br>
of the last message. The last message is #setFocus, and the receiver<br>
of the #setFocus was the object returned by the #textInput message.<br>
Thus, #value: is being sent to a WATextInputTag (or similar object),<br>
not to the WARenderCanvas (which is probably what you really wanted).<br>
<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; value: self headDataModelView employeeName;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; callback: [:value | self headDataModelView employeeName:<br>
&gt; value]]<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; output: self headDataModelView employeeName<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; on: html.<br>
&gt;<br>
&gt; MLHeadDataModelView&gt;&gt;initialize<br>
&gt; initialize<br>
&gt; &nbsp; &nbsp; super initialize.<br>
&gt; &nbsp; &nbsp;self headDataModelView: MLHeadDataModel new.<br>
&gt;<br>
&gt; I don&#39;t get any error messages if I use the on:of: style, but not<br>
&gt; sure what exact difference or benefits are between the two.<br>
<br>
The difference is that you don&#39;t have a #setFocus message.<br>
<br>
&gt; MLHeadDataModelView&gt;&gt;renderCompanyTextInputOn:<br>
&gt; renderCompanyTextInputOn: html<br>
&gt; self<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; renderLabel: &#39;Company Name: &#39;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; input: [<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; html textInput on: #companyName of: self<br>
&gt; headDataModelView]<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; output: self headDataModelView companyName<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; on: html.<br>
&gt;<br>
&gt; MLHeadDataModelView&gt;&gt;renderEmployeeTextInputOn:<br>
&gt; renderEmployeeTextInputOn: html<br>
&gt; self<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; renderLabel: &#39;Employee Name: &#39;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; input: [<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; html textInput on: #employeeName of: self<br>
&gt; headDataModelView]<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; output: self headDataModelView employeeName<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; on: html.<br>
&gt;<br>
&gt; Thanks in advance for any feedback.<br>
&gt;<br>
&gt; Regards<br>
&gt; Adrian<br>
<br>
Hope that helps, and welcome to Seaside!<br>
<br>
James Foster<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.squeakfoundation.org/pipermail/seaside/attachments/20080830/febc0a74/attachment.htm" target="_blank">http://lists.squeakfoundation.org/pipermail/seaside/attachments/20080830/febc0a74/attachment.htm</a><br>

<br>
------------------------------<br>
<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br>
<br>
End of seaside Digest, Vol 68, Issue 38<br>
***************************************<br>
</blockquote></div><br></div>