[Geomoose-users] User extensions- Disclaimer not working!

Len Kne lkne at houstoneng.com
Tue Mar 2 09:28:38 EST 2010


Hi Franz

There is a bug in Disclaimer.js.  It should look like (note the } before the else statement):

DisclaimerExtension = new OpenLayers.Class(GeoMOOSE.UX.Extension, {
                load: function() {
                                if(window.DISCLAIMER_MESSAGE) {
                                                alert(window.DISCLAIMER_MESSAGE);
                                }
                                else {
                                                alert("Hello, World!");
                                }
                },

                CLASS_NAME: "DisclaimerExtension"
});

GeoMOOSE.UX.register('DisclaimerExtension');

Also, Step 3 of the instructions states to add the script in the head section of geomoose.html.  This line needs to be after OpenLayers is defined, so your best bet is to add the line right before </head>

Len


From: FRANZ OKYERE [mailto:franzzoa at hotmail.com]
Sent: Thursday, February 25, 2010 10:30 PM
To: geomoose-users at lists.sourceforge.net
Subject: [Geomoose-users] User extensions- Disclaimer not working!

Hi all,

I want write my own extension, so I started by testing the disclaimer.js extension. Apparently, it does not do nothing. Is there anything I need to do apart from including,

<script type="text/javascript" src="extensions/Disclaimer.js"></script>

in the geomoose application (geomoose.html)?

Maybe, just maybe, as I am a newbie in javascript, is there a problem with (in geomoose.js):

GeoMOOSE.UX.Extension = OpenLayers.Class({
 initialize: function () {
  /* do nothing on creation */
 },
 load: function() {
  /* do nothing on load */
 },
 CLASS_NAME: 'GeoMOOSE.UX.Extension'
});



FYI:
Disclaimer.js
DisclaimerExtension = new OpenLayers.Class(GeoMOOSE.UX.Extension, {
 load: function() {
  if(window.DISCLAIMER_MESSAGE) {
   alert(window.DISCLAIMER_MESSAGE);
  else {
   alert("Hello, World!");
  }
 },

 CLASS_NAME: "DisclaimerExtension"
});
GeoMOOSE.UX.register('DisclaimerExtension');


Thanks

Franz Okyere








________________________________
Not got a Hotmail account? Sign-up now - Free<http://clk.atdmt.com/UKM/go/197222280/direct/01/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20100302/7f72c41e/attachment.html


More information about the Geomoose-users mailing list