dataProvider = <classpaths label="Class Paths"></classpaths>;
dataProvider = XMLList(<classpaths label="Class Paths"></classpaths>);
The first results in an ArrayCollection dataProvider while the second one results in an XMLListCollection. Strange things happen with an ArrayCollection. Using the second way, I didn't get the undefined error. Good luck.
On 2/9/06, Teoti Graphix <[EMAIL PROTECTED]> wrote:
Hello,
I am writting this more as a comment then question.
I have spent 2 days experimenting with the mx.collections classes and it has been fun. Now, I have a project where I need the tree's root to be;
ClassPaths
- > c:/classes
- > dir structure
- > c:/mm/classes ...
- > dir structure..
I am loading all the xml tree structure form php fine. What is the method for creating the root now ClassPaths ONCE, then on each new 'loadCLassPath() call, add the new xml to the CLassPaths root node.
I have almost got it but, the tree gives me node opne errors after I get 2 nodes inserted.
Am I doing something wrong?
protected function loadDir(evt:ResultEvent):void
{
var newList:XMLList = new XMLList(evt.result);
if (dataProvider == null) {
dataProvider = <classpaths label="Class Paths"></classpaths>;
}
dataProvider.source[0].appendChild(newList);
}
Peace, Mike
PS the error when click to open the root node is...
"TypeError: Error #1010: undefined has no properties.
at mx.controls::Tree/setIsOpen()
at mx.controls.treeclasses::TreeCellRenderer/disclosurePress()
"
--
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
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
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 .
--
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
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
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.