<div>Hi Tim,<br> Let me see if I'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'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>>>initialize<br>....<br> self addSubpane: self map<br>...<br><br><br>>>map<br> ^LBCGoogleMap new<br> name: 'mapDisplay'; " configure the mapDisplay's name"<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 "callback" (the message sent when the list is<br>
#changed) you should replace it as follows:<br><br> oldMap := self paneNamed: 'mapDisplay'.<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 >>renderContentOn: aRenderer<br><br> aRenderer div<br> id: self styleId;<br> with: [ "render your component" ]<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> "Support for the events"<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: 'anyId' 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"><<a href="mailto:timothy@churchmilitant.org">timothy@churchmilitant.org</a>></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: 'region'.<br> panes := OrderedCollection<br> with: ( self paneNamed: 'nhoodList')<br> with: ( self paneNamed: 'cityList').<br>
pane := SFListBox new.<br> pane<br> name: 'regionList';<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: 'mapDisplay')*.<br> pane := SFButton new.<br> pane<br> label: 'Update Map';<br> name: 'updateButton';<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>