the null object thing seems simpler than my idea, thank you!<br><br><div class="gmail_quote">On Fri, Apr 25, 2008 at 8:41 PM, David Zmick &lt;<a href="mailto:dz0004455@gmail.com">dz0004455@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
The login isn&#39;t a requirement to get on the page, so I want to have a link, but, I understand what you are saying<div><div></div><div class="Wj3C7c"><br><br><div class="gmail_quote">On Fri, Apr 25, 2008 at 6:24 PM, Ramon Leon &lt;<a href="mailto:ramon.leon@allresnet.com" target="_blank">ramon.leon@allresnet.com</a>&gt; wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>&gt;<br>
&gt; wow, this shouldn&#39;t be that hard to figure out, but, I can&#39;t<br>
&gt; seem to be able to change the value of wantsLogin( the<br>
&gt; variable I am using, should be self explanatory) from my<br>
&gt; prototype menu component, so, I can&#39;t get to the login<br>
&gt; component, what am i doing?<br>
&gt;<br>
&gt; MenuComponent&gt;&gt;renderConentOn: html<br>
&gt; &nbsp; &nbsp; &nbsp;html anchor callback: [self session wantsLogin: true];<br>
&gt; with: [html text: &#39;login&#39;]<br>
&gt;<br>
&gt; RootTask&gt;&gt;go<br>
&gt; &nbsp; &nbsp; [ self session wantsLogin ]<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; whileTrue: [Transcript show: &#39;wantsLogin = true&#39;; cr.<br>
&gt; self call: self loginComponent].<br>
&gt; &nbsp; &nbsp; Transcript show: &#39;wantsLogin = false&#39;; cr. self call:<br>
&gt; self menuComponent<br>
&gt;<br>
<br>
</div>Your logic seems a bit backwards here. &nbsp;By the time your menu component is<br>
shown and has the chance to modify wantsLogin, you&#39;re past the login. &nbsp;To<br>
make it work, you need to restart the task by answering from the menu.<br>
<br>
&nbsp;html anchor callback: [self session wantsLogin: true. self answer]; with:<br>
&#39;login&#39;<br>
<br>
So the menu component returns control of the UI back to the Task, which will<br>
then restart. &nbsp;If you&#39;re going to force a login, probably better to stick<br>
the user on the session and have the task check for a nil user instead, then<br>
the login form need just set a current user on the session.<br>
<br>
I usually use a null object pattern here and have a special null user so I<br>
can delegate to the current user (whether logged in or out) to find out what<br>
actions are available. &nbsp;For example, login is a valid action for a null user<br>
while logout is a valid action for any other user.<br>
<font color="#888888"><br>
Ramon Leon<br>
<a href="http://onsmalltalk.com" target="_blank">http://onsmalltalk.com</a><br>
</font><div><div></div><div><br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">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>
</div></div></blockquote></div><br><br clear="all"><br></div></div><div><div></div><div class="Wj3C7c">-- <br>David Zmick<br>/dz0004455\<br><a href="http://dz0004455.googlepages.com" target="_blank">http://dz0004455.googlepages.com</a><br>
<a href="http://dz0004455.blogspot.com" target="_blank">http://dz0004455.blogspot.com</a>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>David Zmick<br>/dz0004455\<br><a href="http://dz0004455.googlepages.com">http://dz0004455.googlepages.com</a><br><a href="http://dz0004455.blogspot.com">http://dz0004455.blogspot.com</a>