Adobe Dreamweaver Forums



Last 10 THreads :         Live stream player (Last Post : noobie_here - Replies : 0 - Views : 1 )           »          cfloop within a cfif tag (Last Post : Azadi - Replies : 2 - Views : 3 )           »          Making constraints on a symbol... (Last Post : sirkibble2 - Replies : 0 - Views : 1 )           »          Creating a boundry in the stage... (Last Post : fazstp - Replies : 2 - Views : 3 )           »          Director or Flash? (Last Post : Sean Wilson - Replies : 1 - Views : 2 )           »          DW8 Activation not working (Last Post : moonliner - Replies : 0 - Views : 1 )           »          Re: Mouse capture won't activate (Last Post : robertnagle - Replies : 0 - Views : 1 )           »          help! my FB3 has gone insane! (Last Post : peteandrus - Replies : 0 - Views : 1 )           »          help! my FB3 has gone insane! (Last Post : peteandrus - Replies : 0 - Views : 1 )           »          How come the html is being displayed, and not the link (Last Post : Skaterstu - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 10-10-2008, 09:31 PM
|>AoA
 
Posts: n/a
Diggs:
Default for each (var item:XML in event.result.detail) notworking as it should

The attached code gives me 3 alert boxes(as it should), but when I uncomment 1
or both of the commented lines, I only get 1 alert box(the first node of the
returned XML).

var xmlResult:XML = XML(event.result);

var lastX:int = lblStatus.x;
var lastY:int = lblStatus.y + lblStatus.height + 10;

for each(var item:XML in event.result.detail)
{
Alert.show(item.name);
//controlArray.addControl(-1, item.name, "Label", lastX, lastY, -1, null, -1,
-1, -1, null, null, 0, item.value);
//lastY += controlArray[controlArray.length - 1].height + 25;
}

controlArray.alignControls();



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-12-2008, 10:55 AM
|>AoA
 
Posts: n/a
Diggs:
Default Re: for each (var item:XML in event.result.detail) notworking as it should

Anyone?

The code just seems to get interrupted when one or both of those lines are uncommented.
Reply With Quote
  #3 (permalink)  
Old 10-12-2008, 02:47 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: for each (var item:XML in event.result.detail) not working as it should


"|>AoA<| killa" <webforumsuser@macromedia.com> wrote in message
news:gcodv9$4ma$1@forums.macromedia.com...
> The attached code gives me 3 alert boxes(as it should), but when I
> uncomment 1
> or both of the commented lines, I only get 1 alert box(the first node of
> the
> returned XML).
>
> var xmlResult:XML = XML(event.result);
>
> var lastX:int = lblStatus.x;
> var lastY:int = lblStatus.y + lblStatus.height + 10;
>
> for each(var item:XML in event.result.detail)
> {
> Alert.show(item.name);
> //controlArray.addControl(-1, item.name, "Label", lastX, lastY, -1,
> null, -1,
> -1, -1, null, null, 0, item.value);
> //lastY += controlArray[controlArray.length - 1].height + 25;
> }
>
> controlArray.alignControls();


What's the code for controlArray?


Reply With Quote


  #4 (permalink)  
Old 10-12-2008, 04:01 PM
|>AoA
 
Posts: n/a
Diggs:
Default Re: for each (var item:XML in event.result.detail) notworking as it should

It's a rather large class(~500 lines) to post here. And as I said before, it
works just fine in other cases.

But here is a pastebin link to it: http://pastebin.com/m52c525e2

I'm sorry that there are no comments.

Reply With Quote
  #5 (permalink)  
Old 10-13-2008, 08:25 PM
ntsiii
 
Posts: n/a
Diggs:
Default Re: for each (var item:XML in event.result.detail) notworking as it should

"interrupted" how? When you step through the code in the debugger, where does it fail?
Tracy
Reply With Quote
  #6 (permalink)  
Old 10-13-2008, 10:11 PM
|>AoA
 
Posts: n/a
Diggs:
Default Re: for each (var item:XML in event.result.detail) notworking as it should

Well, found the problem

Apparently there WERE some bugs in the class: 2 null pointer exception bugs... Now its working perfectly

Thanks for the replies
Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 02:37 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk