This sounds like you’re implementing
a TreeDataProvider more than a regular list DataProvider (if you’re
seeing calls to getChildNodes). The list/tree will subscribe automatically to
the modelChanged event. You’re right that getParent() is required for
the TreeDataProvider, I think the livedocs might have been updated to reflect
it.
I believe there is an example of a custom
tree data provider out there but I couldn’t speak of it for sure.
Matt
From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of zhongtie
Sent: Thursday, July 21, 2005 6:36
PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Writing a
Custom Data Provider
Hi,
I am trying to write a custome data provider for
my list control. My
data is not an array, so I am trying to rewrite
all those APIs. Here
are some questions:
1. is "modelChanged" event subscription
handled by the flex framework?
In another word, do I need to do any thing besides
calling
dispatchEvent({target:this,
type:"modelChanged", eventName:"...")?
2. Is there any good example I could follow? I
tried this example
(http://www.macromedia.com/support/documentation/en/flex/1/mixin/mixin3.html),
but ran into many issues, such as:
a. getParent() required by the
compiler. It's not in the ASDoc,
however;
b. I saw many warnings in the log:
Warning: getChildNodes is not a function
Warning: __get__editable is not a function
Warning: hasChildNodes is not a function
Warning: getParent is not a function
...
c. The GUI doesn't update
itself unless I hover my mouse around.
Any advice will be greatly appreciated!
Tim
--
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
Computer software testing
Macromedia flex
Development
Software developer
YAHOO! GROUPS LINKS
Visit your group "flexcoders" on the web.
To unsubscribe from this group, send an email to: [EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.