I've got a clone( ) method in UnitVO that initializes a new instance of UnitVO to the values of the current instance and returns the copy. When I add the clone to the DataGrid, I get the same result. A row is added but I can't see any data. Now my code looks like this:
var newUnit:UnitVO = unitData.clone( ); ModelLocator.currentDeal.addUnit( newUnit ); --- In [email protected], "Doug Lowder" <[EMAIL PROTECTED]> wrote: > > I think you want to call ModelLocator.currentDeal.addUnit( new UnitVO( > ) ) to add a new unit. Or, you could add a clone() method to your > UnitVO object and make sure you either pass the clone to addUnit() or > have addUnit() explicitly clone the object before adding it to the > array. What you have now is probably adding the same object reference > that you then clear out. > > Doug -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

