Passing anything as a paramater to a method (function) does not make the
thing available to the object or 'this' outside of the function.
The array will not be copied to a local array. The object will have a
'reference' to the original array and changing it will change the original
array which is what you want.
In order to have a local copy of the array you need to copy it; use the
concat() function into a new empty array.
Todd
----- Original Message -----
From: "James Musick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, August 27, 2002 4:19 PM
Subject: Re: [Dynapi-Help] Prototype method accessing object argument?


> >    // DON"T YOU NEED:
> >       this.aTestArray = aTestArray
> >       this.sFoo = sFoo;
>
>   Right, so essentially a local copy of the one passed in is needed,
rather
> than accessing the one passed in directly, yes?
>>>nope

>
>   Saying this.aTestArray = aTestArray is making a local (this object) copy
> rather than just dealing with aTestArray directly.
>>> Just making a local reference to the array.

>
>   I guess I expected that either it would be done implicitly, or that
> aTestArray could be accessed without the 'this.' designation since it was
> passed in. I dunno....not much of a question since it's fairly
> straighforward to get it to work. I was just suprised that the object
passed
> in as an argument wasn't directly acessible without the explicit
> this.whateverNameIWant = aTestArray.
>
>   Thanks (as always) for the response.
>
>   Cheers,
>   James
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx
>
>
>
> -------------------------------------------------------
> 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
>



-------------------------------------------------------
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to