From: Mike.Adair@CCRS.NRCan.gc.ca - 2004-03-28 21:33:49
|
I was thinking along the same lines, except I would call it just mapbuilder.js. The last line of this file should also call the Config constructor and assign it to the global config object. I would just include Modelbase and WidgetBase in here and not worry about if it is already loaded or not. All mapbuilder apps will have a model, and most will have widgets. Also, we should rename the config object as "mbConfig" instead of "config" because "config" is more likely to be used by other javascript packages. There is some clean up to do in Util.js - this probably shouldn't have any geographic code. Do we merge Sarissa into this file as well? Mike -----Original Message----- From: Cameron Shorter [mailto:ca...@sh...] Sent: March 28, 2004 3:40 PM To: mapbuilder Subject: [Mapbuilder-devel] Initialisation and dependancies I'd like to simplify the Config.xml file further and remove most of the <script includes> from complete.html. I don't think that Config.xml or complete.html should know that MapPane.js depends on WidgetBase.js and Listener.js. This information should be stored inside MapPane.js. So I propose that complete.html only includes and initialises one script - the mapbuilderBootStrap.js script. MapbuilderBootStrap will include all initial scripts (Util.js and Config.js) then load all the scripts specified in the Config.xml (as it currently does). Objects like MapPane, which have dependancies on other objects will need to load these scripts at initialisation time. I assume that we can have something like: if (! WidgetBase) loadScript($baseDir+"widget/WidgetBase.js") Any objections? -- Cameron Shorter ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ mapbuilder-devel mailing list map...@li... https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel |