<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Ok gentlemen I am hoping you can comment on whether or not this has
been done properly. I have created two subpanes (there are 8 in
total). By the way I have 3 listboxes dynamically changing the list
contents -- so it is working perfectly but for one hurdle.<br>
<br>
<b>createMapPane<br>
| pane |<br>
<br>
pane := LBCMapComponent new.<br>
pane name: 'mapDisplay'.<br>
pane styleId: self liveMapId.<br>
pane model: model.<br>
^pane.</b><br>
<br>
<b>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>
with: (self paneNamed: 'mapDisplay').<br>
pane := SFListBox new.<br>
pane name: 'regionList';<br>
items: list;<br>
lines: 5;<br>
printSelector: #asString;<br>
owner: self;<br>
<br>
when: #changed:<br>
send: #regionSelectionChanged:<br>
to: self<br>
refresh: panes.<br>
^ pane</b><br>
<br>
The map pane is to be updated when a change has been triggered in
regionList. When regionList is change the regionSelectionChanged
method is called which in turn calls updatePane when completed. <br>
<br>
<b>updatePane<br>
self updateRegionPane; updateCityPane; updateHoodPane; updateMapPane</b><br>
<br>
The updateMapPane executes the following:<br>
<br>
<b>updateMapPane<br>
| pane newpane|<br>
<br>
pane := self paneNamed: 'mapDisplay'.<br>
newpane := LBCMapComponent new.<br>
newpane<br>
model: model;<br>
styleId: self liveMapId;<br>
name: 'mapDisplay'.<br>
<br>
self replacePane: pane with: newpane.</b><br>
<br>
which in turn fires the refreshOn: method is on LBCMapComponent.<br>
<br>
<b>refreshOn: aScript<br>
<br>
aScript element<br>
id: self styleId;<br>
replace:[:render | render render: self].<br>
<br>
"I am not sure what needs to be done here"<br>
aScript add: [ ]</b><br>
<br>
which will in turn execute renderOn: <br>
<br>
<b>renderOn: html<br>
|myMap|<br>
myMap := self map.<br>
<br>
myMap renderOn: html.</b><br>
<br>
where map returns<br>
<br>
<b>map<br>
<br>
^LBCGoogleMap new<br>
setCenter: model coordinates zoom: model zoom;<br>
setUIToDefault;<br>
yourself.</b><br>
<br>
All the components are updated correctly however the map does not
redraw. If I refresh the browser than the map draws correctly -- so it
has to do with the script in the refreshOn method, correct? If so I,
my ignorance of javascript has left me at a loss as to what needs to be
done. Do I need to call replace? Any suggestions? Thank you in
advance.<br>
<br>
<blockquote
cite="mid:60481d60909011006o19466b7ds805c1022c01612f0@mail.gmail.com"
type="cite">
<pre wrap="">
_______________________________________________
seaside mailing list
<a class="moz-txt-link-abbreviated" href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a>
<a class="moz-txt-link-freetext" href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a>
</pre>
</blockquote>
<br>
<br>
<br>
</body>
</html>