[mapguide-users] Autodesk Help - OnSelectionChanged

Jason Birch Jason.Birch at nanaimo.ca
Wed May 17 00:28:28 EDT 2006


Great, thanks Walt.
 
Sorry for taking your time on this; I was hacking without a full understanding of the framework.  The timer was in place because of an earlier solution that Alain posted for dealing with zoom slider oversensitivity.  Basically, this was suggested as a method of ensuring that the slider (a few frames in) was in place and initialized before I overrode its settings. 
 
So, it looks like I need to:
 
- spend some more time familiarizing myself with the structural differences between the UIs, and
- adopt a hybrid approach: overriding common functions on frame load, and only using the timer for items that require it.
 
Thanks again,
Jason

________________________________

From: Walt Welton-Lair [mailto:walt.welton-lair at autodesk.com]
Sent: Tue 2006-05-16 9:02 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] Autodesk Help - OnSelectionChanged


Thanks for posting these.
 
I debugged into this and the problem is with your watchInitialized() method.  It only hooks up your custom OnSelectionChanged handler if ViewerFrame.mapFrame.mapInit is true.  Unfortunately in the DWF Viewer case, the mapFrame doesn't have a 'mapInit' variable.
 
The timer approach seems a bit complex.  I replaced it by setting an onLoad handler on the ViewerFrame:
 
    <frame src="...." name="ViewerFrame" onLoad="doOnLoad();">
 
and then hooked up the custom SelectionChanged handler in doOnLoad():
 
    function doOnLoad()
    {
        originalOnSelectionChanged = ViewerFrame.OnSelectionChanged; 
        ViewerFrame.OnSelectionChanged = MyOnSelectionChangedHandler; 
    }
 
This works for both DWF and AJAX in IE.
 
Walt

 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 6500 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060516/3363180e/attachment.bin


More information about the Mapguide-users mailing list