Hi Tracy,
The Tree component has now a dataDescriptor which you can implement with
your own methods if needed. For example:
<mx:Tree id="myTree" x="10" y="10" width="273" height="559"
dataProvider="{something}"
dataDescriptor="{new MyCustomTreeDataDescriptor()}" >
</mx:Tree>
----------------------
MyCustomTreeDataDescriptor .as
package
{
import mx.collections.ICollectionView;
import mx.collections.IViewCursor;
import mx.controls.treeClasses.*;
public class MyCustomTreeDataDescriptor implements ITreeDataDescriptor
{
// The isBranch method simply returns true if the node is an
// Object with a children field.
// It does not support empty branches, but does support null children
// fields.
public function isBranch(node:Object, model:Object=null):Boolean
{
try
{
if (node is Object)
{
if (node.children != null)
{
return true;
}
}
}
catch (e:Error)
{
trace("[Descriptor] exception checking for isBranch");
}
return false;
}
}
There is an example in the livedocs for F2B2 that needs minor changes to
have it working in B3
|---------+----------------------------->
| | |
| | "Tracy Spratt" |
| | <[EMAIL PROTECTED]> |
| | Sent by: |
| | [email protected] |
| | 06/09/2006 04:11 PM |
| | Please respond to |
| | flexcoders |
| | |
|---------+----------------------------->
>-----------------------------------------------------------------------------------------------------------------------------|
|
|
| To: <[email protected]>
|
| cc:
|
| Subject: [flexcoders] Migration: What is the F2 equivalent of
"TreeNode" |
>-----------------------------------------------------------------------------------------------------------------------------|
One of my apps uses the 1.5 TreeNode class and the treeDataProvider methods
to build big complex treeDataProviders.
Is this gone completely in F2? Is there any legacy support?
Is long term migration goig to require moving to an e4x tree? Any other
suggestions?
Tracy
---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure. If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/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/