[OpenLayers-Dev] Class.inherit

Slawomir Messner slawomir.messner at staff.uni-marburg.de
Fri Feb 11 04:14:55 EST 2011


Hi,
I updated our version of OpenLayers to svn trunk. Now I get the 
following error:
P is undefined
I debugged a lot and there seems to be a problem with classes which 
inherit from a class which is not directly inherits form Class, like 
ZoomPanel where this error occurs first. Then I tried to fix it with 
adding OpenLayers.Control as first inherit class:
OpenLayers.Control.ZoomPanel = 
OpenLayers.Class(OpenLayers.Control,OpenLayers.Control.Panel,...
this works but then the next class came where the parent class is not 
Control or Class it self. So I edited all of them (I was not expect that 
this is the solution but I was interested what next comes). The next 
thing was that the Navigation control couldn't initialize the DragPan. 
OL.Control.DragPan was undefined.
This was the point where I rollback the changes till the update and 
tried it with several older versions of Class, OpenLayers.js but nothing 
helped, the error was OpenLayers is undefined.
In hope someone can help me so I don't have to rollback before the 
update and we can stay compatible with the new trunk.
Second thing is that I would like to know is which classes are required 
for a class to run well or better which have to be in the @requires 
list? All classes which it inherits from and all in the initialize function?
I'm looking forward to answers.
Regards,
Slawomir




More information about the Dev mailing list