Hi there
I have a class containing 2 variables, which I am trying to bind to a
seperate component. I am not using Cairngorm, although the structure
is quite similar, in that I have a component (view) that references
values in a singleton class (model)
In the model-like class I have the following:
public function addItem(item:MyClassObject) {
currentItem = item;
currentItems.addItem(item);
}
[Bindable]
public var currentItem:MyClassObject;
[Bindable]
public var currentItems:ArrayCollection;
In the view-like class I reference the variables like so:
<ns1:MultiView id="multiView" dataProvider="{itemManager.currentItems}" />
<mx:Label id="tmpLabel" text="{itemManager.currentItem.title}" />
In the script part of this component I reference the model-like class:
[Bindable]
public var itemManager:ItemManager = ItemManager.getInstance();
My MultiView class is a custom component that takes the
ArrayCollection of 'currentItems' and adds them as children. There
might be a problem in this code preventing the associated children
from updating.
The binding should however work for the label (tmpLabel).
Any help much appreciated
Tracy
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
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/