Select to view content in your preferred language

Extending JScript

662
0
07-05-2010 11:17 PM
BerendVeldkamp
Frequent Contributor
I know it is possible to extend JScript objects, e.g.
string.Prototype.sayHello = function()
{
    return "Hello " + this;
}


Can I do something similar with the native ArcPad objects? I tried
Layer.prototype.isPolygon = function()
{
    return this.Records.Fields.ShapeType % 5 == 0;
}

but even before calling the method, I get a message: "'Layer' is undefined".

Any ideas?
Tags (3)
0 Kudos
0 Replies