Matt,
 
I seems that it's the same problem I have with the viewing of chart.
May the problem come from a bad configuration of the .war or something like that.
 
David


De : [email protected] [mailto:[EMAIL PROTECTED] De la part de Matt Chotin
Envoyé : jeudi 23 juin 2005 06:43
À : [email protected]
Objet : RE: [flexcoders] TREE : extending the tree component

Hmm, I just compiled a Tree subclass that refers to selectedIndex and it worked fine so I’m not sure why you’d get the error.  I also compiled the segment that you gave (while commenting out the pieces you didn’t give) and it compiled OK too, so you must have something else going on.

 

Matt

 


From: [email protected] [mailto:[email protected]] On Behalf Of david_gal-reyniez
Sent: Wednesday, June 22, 2005 3:18 AM
To: [email protected]
Subject: [flexcoders] TREE : extending the tree component

 

Hi everybody!

 

I need your help to cuztomize the Tree component...

I aim at expanding all nodes of my cuztomized tree when initializing it.

 

I created a CuztomizedTree class as following :

------------------------------------------------------------------------------------------------------------------------

import mx.controls.Tree;
import mx.controls.treeclasses.TreeNode;
import mx.controls.Alert;

 

class com.as.components.CustomizedTree extends Tree

 

function CustomizedTree()
 {
 }
 
 function setIsOpen( node, open, animate, fireEvent):Void
 {

    // actions dedicated to the SetIsOpen method

}

 

 public function expandTree()
 {
  var selectedNode:TreeNode=this.selectedNode;
  if (selectedNode && this.selectedIndex != 0)
  {
   var node:TreeNode=this.getNodeDisplayedAt(this.selectedIndex);
   this.setIsOpen(node,true); 
   setAdaptedIcon(this, selectedNode, selectedNode.attributes.operand);
  } else {
   var i:Number=0;
   var node:TreeNode=this.getTreeNodeAt(i);


   Alert.show("node.selectedIndex : " + node.attributes.label, "______Message__", Alert.OK);

    // this message generates the following message

    //

    // Error /WEB-INF/flex/user_classes/com/as/components/CustomizedTree.as:100

    // There is no property with the name 'selectedIndex'.
    //

    // Error

    // Unable to create ActionScript Component for com.as.components.CustomizedTree: Could not compile 'synthetic: Object.registerClass() for com.as.components.CustomizedTree'


   while (node != undefined)
   {
    if (this.getIsBranch(node) && ! this.getIsOpen(node))
    {
     this.setIsOpen(node,true);
    }
    setAdaptedIcon(this, node, node.attributes.operand);
    i++;
    node=this.getNodeDisplayedAt(i);
   }
  }
 }

---------------------------------------------------------------------------------------------------------------------------------

In my Tree.mxml file, I call this method in an initAppli method


 public function initTree()
 {
  tree.expandTree(); // tree is the name of my CuztomizedTree object
 }

------------------------------------------------------------------------------------------------------------------------------------

Any suggestions?

Thank a lot!

 

PS: Thanksfull thoughts to Gordon Smith, Tracy Spratt and Matt Chottin for their suggestions concerning the treenode adding and the tree collapsing!

**********************************************************************

Coface facilite les echanges entre les entreprises partout dans le monde. Pour cela, elle offre a toutes les entreprises des solutions pour gerer, financer et proteger leur poste client, en leur permettant d'externaliser tout ou partie de la gestion et des risques lies a leurs relations commerciales. Coface est notee AA par Fitch Ratings et Aa3 par Moody's.

Pour en savoir plus, http://www.coface.fr

Coface facilitates business-to-business commerce worldwide. It offers all size companies an array of solutions to manage, finance, and protect their accounts receivables affording them the option of fully or partly outsourcing trade relationship management and attendant risks. Coface is rated AA by Fitch ratings and Aa3 by Moody's.

More about Coface, http://www.coface.com

WARNING :

- Soyez conscient que notre systeme Anti-Spam peut parfois rejeter des messages, soit parce que certains mots et types de fichiers ne sont pas acceptes, ou bien parce que le mail n'a pas ete identifie correctement.

- Be aware that from time to time our Anti-Spam system may reject mails either because some words and types of files are not allowed or because mails are misidentified.

**********************************************************************

 



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


**********************************************************************

Coface facilite les echanges entre les entreprises partout dans le monde. Pour cela, elle offre a toutes les entreprises des solutions pour gerer, financer et proteger leur poste client, en leur permettant d'externaliser tout ou partie de la gestion et des risques lies a leurs relations commerciales. Coface est notee AA par Fitch Ratings et Aa3 par Moody's.

Pour en savoir plus, http://www.coface.fr

Coface facilitates business-to-business commerce worldwide. It offers all size companies an array of solutions to manage, finance, and protect their accounts receivables affording them the option of fully or partly outsourcing trade relationship management and attendant risks. Coface is rated AA by Fitch ratings and Aa3 by Moody's.

More about Coface, http://www.coface.com

WARNING :

- Soyez conscient que notre systeme Anti-Spam peut parfois rejeter des messages, soit parce que certains mots et types de fichiers ne sont pas acceptes, ou bien parce que le mail n'a pas ete identifie correctement.

- Be aware that from time to time our Anti-Spam system may reject mails either because some words and types of files are not allowed or because mails are misidentified.

**********************************************************************



--
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

Reply via email to