I have an object that has 2 parameters. It has a prototype method that can't 
seem to access those parameters....is my syntax incorrect, or is it not 
possible to do this?

var testArray = new Array();
testArray[0]   = 2;
testArray[1]   = 3;
var foo = "test";

myObj = new arrayTest(testArray, foo);
----------------
function arrayTest(aTestArray, sFoo)
{
[other stuff]
return this;
}
arrayTest.prototype.doSomething = function()
{
  alert(aTestArray); //also tried this.aTestArray
  alert(sFoo);////also tried this.sFoo
}

----------------

  It seems like the prototype method should be able to access input 
parameters to the object as well as local variables.
  I could create a
this.localArray = new Array();
this.localArray[0] = aTestArray[0];

  But that seems kind of convoluted if there is a direct way to access 
aTestArray.

  Thanks

  Cheers,
  James

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to