<div>Hi Tim,<br> Let me see if I&#39;ve understood what are you doing. You need to:<br><br>-Create (or modify?) a LBCGoogleMap when a ListBox changes<br>-Render or update the LBCGoogleMap when a Button is clicked.<br><br>You said LBCGoogleMap is not a WAComponent, what it is? If it&#39;s a<br>
SFObject, then you can add to your SearcherInterface sending as<br>argument of #addSubpane: message, as already knows how to answer<br>#name (remember, it must answer #name properly, that is, not the #name<br>method in Object).<br>
<br>Then you can have:<br><br>&gt;&gt;initialize<br>....<br>  self addSubpane: self map<br>...<br><br><br>&gt;&gt;map<br> ^LBCGoogleMap new<br>    name: &#39;mapDisplay&#39;;  &quot; configure the mapDisplay&#39;s name&quot;<br>
    setCenter: model coordinates zoom: model zoom;<br>    addControl: GControl largeMapControl;<br>    setUIToDefault;<br>    yourself.<br><br>If when the list changes, you have to re-create the mapDisplay, in the<br>#regionSelectionChanged &quot;callback&quot; (the message sent when the list is<br>
#changed) you should replace it as follows:<br><br> oldMap := self paneNamed: &#39;mapDisplay&#39;.<br> self replacePane: oldMap with: self map<br><br>And to refresh properly the mapDisplay it should be rendered inside a<br>
tag with id equals to its styleId, like this:<br><br>LBCGoogleMap &gt;&gt;renderContentOn: aRenderer<br><br>           aRenderer div<br>                    id: self styleId;<br>                with: [ &quot;render your component&quot; ]<br>
<br>and must answer #refreshOn: (please see #when:send:to:refresh: section<br>in <a href="http://wiki.squeak.org/squeak/6093" target="_blank">http://wiki.squeak.org/squeak/6093</a>). You can implement it this way:<br><br>
refreshOn: aRenderer<br>      &quot;Support for the events&quot;<br><br>      self renderContentOn: aRenderer<br><br><br>You will need to preserve the same #styleId, to do this simply send<br>the message styleId: &#39;anyId&#39; to the mapDisplay. Another way to solve<br>
this is adding a SFPanel which contains the mapDisplay and refresh it<br>when the button is clicked.</div>
<div> </div>
<div>Regards</div>
<div>Juan M.<br><br></div>
<div class="gmail_quote">On Thu, Aug 27, 2009 at 1:02 PM, Timothy James Ziebart <span dir="ltr">&lt;<a href="mailto:timothy@churchmilitant.org">timothy@churchmilitant.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi All,<br><br>I have an object SearchInterface, a subclass of WASmallFacesComposite.  On SearchInterface there are rendered a number of SFListBoxes and SFButtons.  Included are three listboxes that are cascaded and the control was created like this:<br>
<br>createRegionListBox<br>  |pane panes list|<br>    list := self session findCodeByParent: &#39;region&#39;.<br>    panes := OrderedCollection<br>      with: ( self paneNamed: &#39;nhoodList&#39;)<br>      with: ( self paneNamed: &#39;cityList&#39;).<br>
        pane := SFListBox new.<br>  pane<br>      name: &#39;regionList&#39;;<br>      items: list;<br>      lines: 5;<br>      printSelector: #asString;<br>      owner: self;<br>      when: #changed:<br>          send: #regionSelectionChanged:<br>
          to: self<br>          refresh: panes.<br>  ^pane<br><br>The listboxes work correctly.  What I need to do is have a GoogleMap rendered on SearchInterfaces as well.  The map will not be a WAComponent as I need to render it as new whenever the listbox contents change.  But not before an Update button is pressed.  Such as:<br>
<br>createUpdateButton<br><br>  | pane panes |<br>    panes := OrderedCollection with: (*self paneNamed: &#39;mapDisplay&#39;)*.<br>  pane := SFButton new.<br>  pane<br>      label: &#39;Update Map&#39;;<br>      name: &#39;updateButton&#39;;<br>
      when: #clicked<br>          send: #updateButtonPressed<br>          to: self<br>          refresh: panes.<br>  ^pane<br><br>The question is how do I create *mapDisplay*?  mapDisplay is rendered like this everytime the update button is pressed.<br>
<br>map<br><br>  ^LBCGoogleMap new<br>      setCenter: model coordinates zoom: model zoom;<br>      addControl: GControl largeMapControl;<br>      setUIToDefault;<br>      yourself.<br><br>Can I place it on a SmallFace component that will render as I desire or do I replace it with non SmallFace components?  Thank you for any assistance.<br>
<br>Tim<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>
</blockquote></div><br>