<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'>Sorry, I thought I was...my bad<br><div id="1"><br>---- On Thu, 17 Oct 2013 14:00:59 -0700 <b>Paul DeBruicker&lt;pdebruic@gmail.com&gt;</b> wrote ---- <br></div><br><blockquote style="border-left: 1px solid #0000FF; padding-left: 6px; margin:0 0 0 5px">start your own thread? <br> <br> <br>On Oct 17, 2013, at 1:55 PM, gettimothy &lt;<a subj="" mailid="gettimothy%40zoho.com" href="mailto:gettimothy@zoho.com" target="_blank">gettimothy@zoho.com</a>&gt; wrote: <br> <br>&gt; I have a tbsNavBar that I want to put buttons on and be able to disable/enable the rendering of them depending on what component is using the navBar. <br>&gt; For example, If I am on the Documentation component, I do not want to show a link to the Documentation component when I am on it. <br>&gt;  <br>&gt; In the NavBar, I initialized a couple of dictionaries--one with a selector and the other with a lable to display. <br>&gt;  <br>&gt;  <br>&gt;  <br>&gt;  <br>&gt; initialize <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;super initialize. <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;linkDisplay = Dictionary new. <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;"enable all links by default" <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;linkDisplay  <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at: #signin put: true; <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at:  #documentation put: true; <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at:  #support put: true; <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at:  #signup put: true. <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;linkLabel = Dictionary new.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;linkLabel  <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at: #signin put: 'Sign In'; <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at:  #documentation put: 'Documentation'; <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at:  #support put: 'Help &amp; Support'; <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at:  #signup put: 'Sign Up'. <br>&gt;   <br>&gt;  <br>&gt; Then on render, I want to invoke a callback with a selector named what the key in the dictionary is so that this: <br>&gt;  <br>&gt;  <br>&gt; html tbsNavItem: [ html anchor callback: [self signup]; with: 'Sign Up'   ]. <br>&gt; html tbsNavItem: [ html anchor callback: [self documentation]; with: 'Documentation'   ]. <br>&gt; html tbsNavItem: [ html anchor callback: [self support]; with: 'Help &amp; Support']. <br>&gt; html tbsNavItem: [ html anchor callback: [self signin]; with: 'Sign In']]] <br>&gt;   <br>&gt; Becomes: <br>&gt;  <br>&gt; ... <br>&gt; linkDisplay keysAndValuesDo: [ :key  :value |  value <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ifTrue: [  <br>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;html tbsNavItem: [ html anchor callback: [self key]; with: (linkLabel at: key) ]].... <br>&gt;   <br>&gt;  <br>&gt; I am getting an error <br>&gt;  <br>&gt; MessageNotUnderstood: MyComponent&gt;&gt;key <br>&gt;   <br>&gt; Does anybody have a generic way to dynamically set a callback to a selector? <br>&gt;  <br>&gt; thx in advance <br>&gt; _______________________________________________ <br>&gt; seaside mailing list <br>&gt; <a subj="" mailid="seaside%40lists.squeakfoundation.org" href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a> <br>&gt; <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>seaside mailing list <br><a subj="" mailid="seaside%40lists.squeakfoundation.org" 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></blockquote><br></div></body></html>