can you re-post the file please?  macromedia started bouncing
flexcoders mails today but i think we're back.

--- In flexcoders@yahoogroups.com, Arunkumar S <[EMAIL PROTECTED]> wrote:
>
> Thanks for your reply Matt...
>  
> Your code looks to solve the typecasting problem. But the tree is
not visible as i said in the earlier mail. I have worked with all the
API i know, yet i'm not reacing the solution... I have attached the
full sample you have asked for, can your please try this code and tell
where it went wrong...??
>  
> My ultimate aim is to get the updated ArrayList after making changes
in the tree.
>  
> It would be helpful for me when you make the tree visible when
>  
> dataProvider = {treeDetails}
>  
> or can anyone help me in getting a solution to get the updated
ArrayList.
>  
> Awaiting for your reply. Thanks in advance.
>  
> Regards,
> Arun.
>  
> Note : While running the application use Up & Down buttons to move
the nodes and Update button to reflect changes.
>  
> 
> Matt Chotin <[EMAIL PROTECTED]> wrote: v\:*
{behavior:url(#default#VML);}o\:* {behavior:url(#default#VML);}w\:*
{behavior:url(#default#VML);}.shape {behavior:url(#default#VML);}
> Give us a full small example to work with.  You should really just
play around with the TreeDataProvider API and use a debugger to see if
you can figure out where things are going wrong, that's all I'm going
to do too if I have time.
> 
>  
> 
> ---------------------------------
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Arunkumar S
> Sent: Friday, October 28, 2005 5:24 AM
> To: flexcoders@yahoogroups.com
> Subject: RE: [flexcoders] Problem with type casting a
TreedataProvider back to array...
> 
> 
>  
> 
> Thanks for your reply Matt...
> 
> 
>  
> 
> 
> I tried your code, initially the tree doesn't appears and when i change 
> 
> 
>  
> 
> 
> dataProvider = {treeDetails.children}
> 
> 
>  
> 
> 
> the tree is loaded without any problem, but i when i assign 
> 
> 
>  
> 
> var arr:Array = treeCmp.dataProvider.getProperty("children");
> 
>  
> 
> the arr is shown as undefined, this is because the dataProvider is
already a children of treeDetails. Can you find some other way to
solve the problem...??
> 
>  
> 
> Reagrds,
> 
> Arun.
> 
> 
> 
> Matt Chotin <[EMAIL PROTECTED]> wrote:
> 
> 
> A TreeDataProvider cannot be an array.  It has to be a single object
that has a child array.  So try creating an object like this:
> 
>  
> 
> Var treeDetails:Object = {label: `root'};
> 
> treeDetails.children = treeList;
> 
>  
> 
> get the array of details back:
> 
>  
> 
> var arr:Array = treeCmp.dataProvider.getProperty("children");
> 
>  
> 
> Matt
> 
>  
> 
> ---------------------------------
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of Arunkumar S
> Sent: Thursday, October 27, 2005 4:45 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Problem with type casting a TreedataProvider
back to array...
> 
> 
>  
> 
> Hi all,
> 
> 
>  
> 
> 
> I am assigning an array as TreedataProvider.
> 
> 
>  
> 
> 
> When i'm moving the position of nodes of the tree (using
addTreeNodeAt  /  removeTreeNodeAt), the dataProvider is not updated
to the changed nodes, so i'm explicitly typecasting and assignig back
to array.
> 
> 
>  
> 
> 
> This seems to behave abnormally (undefined node added to the tree at
the top)...
> 
> 
>  
> 
> 
> Here are some pieces of code i use....
> 
> 
>  
> 
> 
>  
> 
> 
> var treeDetails  : Array; // This is assigned as the dataProvider
for the tree
> 
> 
> :
> 
> 
> :
> 
> 
> treeDetails = treeList; // treeList is a array got from Java which
has HashMaps at each row
> 
> 
> :
> 
> 
> :
> 
> 
> // After moving nodes treeDetails is 
> 
> 
> treeDetails = mx.utils.ArrayUtils.toArray(treeCmp.dataProvider) ;
//treeCmp is tree's ID
> 
> 
>  
> 
> 
>  
> 
> 
> Then i'm passing back treeDetails to Java, i'm getting "Error: An
error occurred during service invocation". While assigning
dataProvider to treeDetails i can notice that a undefined node added
to the top.
> 
> 
>  
> 
> 
> Also i noticed that when using a simply array in flex every thing is
working fine, and when the array contains object dataProvider is not
updated and also i'm getting error in java when typecasting and send
it as array.
> 
> 
>  
> 
> 
> Can anyone give me an idea what could have caused the problem.
Please give me a solution.
> 
> 
>  
> 
> 
> Thanks in advance.
> 
> 
>  
> 
> 
> Regards,
> 
> 
> Arun.
> 
> 
> 
> ---------------------------------
> 
> 
> Yahoo! FareChase - Search multiple travel sites in one click. 
> 
> 
> ---------------------------------
> 
> 
> Yahoo! FareChase - Search multiple travel sites in one click. 
> 
> 
> --
> 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 
> 
> 
>     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. 
> 
> 
> ---------------------------------
> 
> 
> 
> 
> 
> 
>               
> ---------------------------------
>  Yahoo! FareChase - Search multiple travel sites in one click.
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/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/
 


Reply via email to