Hi,
I've been storing a few very simple Value Objects in an array and wanted
to use Array.sortOn to sort them. However the value objects use
getter/setters for member access - and the sorting simply didn't seem to
take place.
I've now converted the ValueObjects to use public members instead of
getter/setters - and everything is working nicely.
I don't see how this should make any difference to the way Flash
accesses the values in the VO - does anybody have any idea?
Here's an example of the VO with getter/setters that I couldn't get
Flash to sort:
class SimpleVO
{
private var __year:Number;
private var __clip:MovieClip;
public function SimpleVO(n:Number, mc:MovieClip)
{
__year = n;
__clip = mc;
}
// and normal set of getter/setters in here
public function get year():Number
{
return __year;
}
// etc.
}
Thanks - Nils.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders