[flexcoders] Trying to use an Array inside a VO.

2010-02-04 Thread laurence5905
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.




[flexcoders] Formatting my messages on this list...

2009-05-22 Thread laurence5905
Why is it, every single time I post a message with some code in it, the 
formatting is always removed?  All those tabs and spaces I have in there to 
make my code look halfway decent are all gone when the message is posted.  
Anyone know how to stop the formatting from being removed like that?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA




[flexcoders] Getting data out of a DataGrid...

2009-05-22 Thread laurence5905
Ok, given the following:


  






  


How do I get the data out of the 6th column there?  I don't know the name of 
the field, so the 'event.itemRenderer.data.fieldName' won't work.  And 
something 'event.itemRenderer.data.(regCodeVO.validation_field)' won't work 
either...  So how do you get the data out of a DataGrid when you have the field 
you need stored in a String, instead of hard-coded into the program?

Thanks,
Laurence MacNeill
Mableton, Georgia, USA





[flexcoders] HTTPService not behaving properly?

2009-05-12 Thread laurence5905
I don't get it.  I've got an ArrayCollection being populated by an HTTPService 
call, and it only works like half the time.

If I add a couple of break points to the program, and Debug it, then it works 
100% of the time -- it's acting like there's just not enough time to load the 
thing into memory sometimes.  I also get a 100% success rate if I set the 
ArrayCollection to be the data source for a List Control (like a DataGrid or 
something).  But I don't want to do that -- I want this thing to be loaded in 
memory without me having to set it as a data source for something else.

So is there a way to force my program to stop and wait for this thing to load?

(Sorry if this winds up being a double-post.  I sent it 15 minutes ago and it 
still hasn't appeared on the list, so I'm sending it again.)
--
Laurence MacNeill
Mableton, Georgia, USA