Hi all,
I'm creating a simple class that has an method that will receive an array as a
parameter and store it inside the class in a property. This gives me the error
below and I'm stuck. Also I would like to know why if I change the code inside
the method setGabarito to just ( aRespGabarito =
Data is an Array and p is a String
-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Rodrigo
Augusto Guerra
Sent: donderdag 1 juli 2010 15:36
To: Flash Coders List
Subject: [Flashcoders] passing an array as a
thanks for your reply cor, you are correct, p1 is a parameter for the
constructor (as string) and for the method (as array).
Still, if i change the datatype of data to string the error persists
public function setGabarito(p1:Array) {
var tamanho = p1.length - 1 // o indice comeca com zero
thanks david, that did the trick...
I also realized that this MUST be done inside the method and not along with the
declaration on the top of the class, sorry abt my ignorance but why ?
thanks!
- Original Message -
From: David Hunter
To: rodr...@alumni.org.br
Sent:
From your loop, you're accessing an array element that doesn't exist. I
would actually advise a different approach to the problem.
Don't use pure arrays within pure arrays (called multidimensional
arrays). I find it very hard to understand and maintain that code. It
can get confusing easily and
Thanks for your insights Jason.
At this moment I'm migrating some AS2 code to AS3 OOP, and as seen, I'm not
that familiar with OOP, that´s why these directions are *VERY* helpfull
welcome.
thanks.
- Original Message -
From: Merrill, Jason jason.merr...@bankofamerica.com
To:
6 matches
Mail list logo