try param2:Array= null
C



________________________________
From: laurence5905 <lmacne...@comcast.net>
To: flexcoders@yahoogroups.com
Sent: Thu, February 4, 2010 12:18:47 PM
Subject: [flexcoders] Trying to use an Array inside a VO.

   
I have a Value Object called EventVO.  Inside this object, I want there to be 
an Array, in addition to the various Strings and ints that are in there already 
of course.

My problem comes in the initialization function.  It currently looks something 
like this:
public function EventVO ( param1:String= "", param2:int=0) {
this.param1 = param1;
this.param2 = param2;
}

Let's say I want to make param2 an Array instead.  I would think it should look 
something like this:
public function EventVO (param1:String= "", param2:Array= []) {
this.param1 = param1;
this.param2 = param2;
}

But that gives me the following error:
1047: Parameter initializer unknown or is not a compile-time constant.

So how the heck do you initialize an Array inside a list of function-parameters 
?  This has been driving me CRAZY!!  I can't find the answer anywhere.

Your help would be greatly appreciated.  Thanks.


 


      

Reply via email to