I've written a diagramming component that until recently I had inside a Canvas in my main application like this:

<mx:Canvas>
    <view:Diagram dataProvider="{model.lineage}"/>
</mx:Canvas>

I recently wrote a component that I call ZoomCanvas and placed the Diagram inside it like this:

<view:ZoomCanvas>
    <view:Diagram dataProvider="{model.lineage}"/>
</view:ZoomCanvas>

and now the dataProvider doesn't get set.  Even if I reduce ZoomCanvas to just be an empty canvas component, the Diagram's dataProvider is never set.

I implemented dataProvider as a getter/setter in the Diagram so I could add CollectionChangeEvent listeners like so:

        public function set dataProvider( ln:LineageNode ):void
        {
            trace( this + ": setting dataprovider" );
            if( _data )
            {
                _data.children.removeEventListener( CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler);
            }
            _data = ln;
            _data.children.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler, false, 0, true);
        }

Any ideas what's going on here?  Again, it works in any other container, but it doesn't work an any custom container.  I can't imagine why.

Thanks!

-Tom
__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to