Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I followed the official tutorial explaining how to create personal plugin with openGeo client sdk but unfortunately I couldn't perform that task.
In the beggining, i "copy/ past" the code as it mentioned in the tutorial but my browser told me that gxp is not defined after that i make changes as follows:

* @require plugins/Tool.js

/** api: (extends)
*  plugins/Tool.js


gxp.plugins.DrawBox = Ext.extend(gxp.plugins.Tool, {
ptype: "gxp_drawbox",
addActions: function(){
    return gxp.plugins.DrawBox.superclass.addActions.apply(this, [{
        text: "Draw box"

Ext.preg(gxp.plugins.DrawBox.prototype.ptype, gxp.plugins.DrawBox);  

Then, when I examine the code with chrome I receive this eroor :

Uncaught TypeError: Cannot read property 'prototype' of undefined ext-base.js:7
Ext.apply.extend ext-base.js:7
(anonymous function)

Do you have any hints about resolving this problem?

share|improve this question
up vote 0 down vote accepted

The SDK is not very forgiving when parsing the @require directives. Make sure that each @require line starts with blank-star-blank, and not just with star-blank.

share|improve this answer
oh great !!! I should start with blank-start-blank thank you the problem is resolved – jabrane Jun 4 '13 at 4:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.