Aqui vai um exemplo
Cria as duas seguintes classes.
package
{
[Bindable]
public class FirstValueObject
{
public var id:Number=0;
public var prop1:String='';
public var prop2:String='';
public var prop3:SecondValueObject;
public function FirstValueObject()
{
}
}
}
package
{
[Bindable]
public class SecondValueObject
{
public var id:Number=0;
public var prop1:String='';
public var prop2:String='';
public function SecondValueObject()
{
}
}
}
cria uma função
[Bindable]
public var col : ArrayCollection = new ArrayCollection();
private function init():void
{
for(var i:uint=0;i<10;i++)
{
var item : FirstValueObject = new FirstValueObject();
item.id = i;
item.prop1 = 'something ' + i;
item.prop2 = 'othervalue' + i;
var subitem : SecondValueObject = new SecondValueObject();
subitem.id = 100+i;
subitem.prop1 = 'subitem prop1 =' + i;
subitem.prop2 = 'subitem prop2 =' + i;
item.prop3 = subitem;
col.addItem( item );
}
agora faz binding de um dos objectos algures e muda via scripting uma
das propriedades e ves se não se propaga :)
PS: o codigo não foi testado mas o principio está lá.
--
João Fernandes
Adobe Certified Expert
Adobe Community Expert
http://www.onflexwithcf.org
http://www.riapt.org
Portugal Adobe User Group (http://aug.riapt.org)
--~--~---------~--~----~------------~-------~--~----~
Recebeu esta mensagem porque está inscrito em Grupo "Mailing List da Comunidade
Portuguesa de Rich Internet Applications - www.riapt.org" do Grupos Google.
Para enviar mensagens para este grupo, envie um email para
[email protected]
Para anular a inscrição neste grupo, envie um email para
[email protected]
Para mais opções, visite este grupo em
http://groups.google.com/group/riapt?hl=pt-PT
-~----------~----~----~----~------~----~------~--~---