Note that there are some explanatory texts on larger screens.

plurals
  1. POTwo Objects created with the same Address in Flex
    primarykey
    data
    text
    <p>I have an issue in flex which is causing a bit of a headache!</p> <p>I am adding objects to an ArrayCollection but in doing so, another ArrayCollection is also picking up these changes even though there is no binding occurring. </p> <p>I can see from the debug that the two ACs have the same address but for the life of me can't figure out why.</p> <p>I have two Array Collections:</p> <pre><code>model.index.rows //The main array collection model.index.holdRows //The array collection that imitates the above </code></pre> <p>This phantom data binding occurs only for the first iteration in the loop and for all others it will just write it the once.</p> <p>The reason this is proving troublesome is that it creates duplicate entries in my datagrid.</p> <pre><code>public override function handleMessage(message:IMessage):void { super.handleMessage(message); if (message is IndexResponse) { var response:IndexResponse = message as IndexResponse; model.index.rows.removeAll(); model.index.indexIsEmpty = response.nullIndex; if (model.index.indexIsEmpty !== true) { //Update the index model from the response. Note: each property of the row object will be shown in the UI as a column in the grid response.index.forEach(function(entry:EntryData, i:int, a:Array):void { var row:Object = { fileID: entry.fileID, dadName: entry.dadName }; entry.tags.forEach(function(tag:Tag, i:int, a:Array):void { row[tag.name] = tag.value; }); model.index.rows.addItem(row); }); if(model.index.indexForNetworkView == true){ model.index.holdRows.source = model.index.holdRows.source.concat(model.index.rows.source); model.index.indexCounter++; model.index.indexForNetworkView = false; controller.indexController.showNetwork(model.index.indexCounter); } model.index.rows.refresh(); controller.networkController.show(); } } </code></pre> <p>Has anyone else who has encountered something simillar propose a solution?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload