--- In flexcoders@yahoogroups.com, "flexaustin" <[EMAIL PROTECTED]> 
wrote:
>
> I have been tracing this bug for two days and finally found it. I
> don't see how this .normalize method is changing data in other areas
> of my code?
> 
> So when makeData is called I pass it xml with child nodes. It is
> stored in _data and then I se several variables and call the the
> buildXMLObj method. When inside the buildXMLObj when the line with
> .normalize is run my variable _data (now only contains parent nodes
> with out the children). The buildXMLObj removes children but it is
> never assigned to _data so how is _data getting changed?

Are you sure the children are gone and not just empty?

> package 
> {
>       public class DataDelegate
>       {
>               import mx.rpc.AsyncToken;
>               import mx.utils.ObjectUtil;
>               
>               import com.models.ViewModelLocator;
>               
>               private var modelLocator:ViewModelLocator =
> ViewModelLocator.getInstance();
>               private var _newSelected:int = 0;
>               private var midXML:XMLList;
>               private var _data:XMLList;
>               
>               public function DataDelegate(){
> 
>               }
>               
>               private function buildXMLObj(xmllist:XMLList):void
>               {
>                       var copyOfList:XML = <groups/>;
>                       for each (var xl:XML in xmllist)
>                       {
>                                if (xl.length())
>                        {
>                               xl.replace("*", "");

This line here is removing any information from the children.

HTH;

Amy

Reply via email to