<!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<pdebruic@gmail.com></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 <<a subj="" mailid="gettimothy%40zoho.com" href="mailto:gettimothy@zoho.com" target="_blank">gettimothy@zoho.com</a>> wrote: <br> <br>> 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>> 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>> <br>> In the NavBar, I initialized a couple of dictionaries--one with a selector and the other with a lable to display. <br>> <br>> <br>> <br>> <br>> initialize <br>> super initialize. <br>> linkDisplay = Dictionary new. <br>> "enable all links by default" <br>> linkDisplay <br>> at: #signin put: true; <br>> at: #documentation put: true; <br>> at: #support put: true; <br>> at: #signup put: true. <br>> linkLabel = Dictionary new. <br>> linkLabel <br>> at: #signin put: 'Sign In'; <br>> at: #documentation put: 'Documentation'; <br>> at: #support put: 'Help & Support'; <br>> at: #signup put: 'Sign Up'. <br>> <br>> <br>> Then on render, I want to invoke a callback with a selector named what the key in the dictionary is so that this: <br>> <br>> <br>> html tbsNavItem: [ html anchor callback: [self signup]; with: 'Sign Up' ]. <br>> html tbsNavItem: [ html anchor callback: [self documentation]; with: 'Documentation' ]. <br>> html tbsNavItem: [ html anchor callback: [self support]; with: 'Help & Support']. <br>> html tbsNavItem: [ html anchor callback: [self signin]; with: 'Sign In']]] <br>> <br>> Becomes: <br>> <br>> ... <br>> linkDisplay keysAndValuesDo: [ :key :value | value <br>> ifTrue: [ <br>> html tbsNavItem: [ html anchor callback: [self key]; with: (linkLabel at: key) ]].... <br>> <br>> <br>> I am getting an error <br>> <br>> MessageNotUnderstood: MyComponent>>key <br>> <br>> Does anybody have a generic way to dynamically set a callback to a selector? <br>> <br>> thx in advance <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> <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>