Adobe Dreamweaver Forums



Last 10 THreads :         Re: Photoshop CS4 is a disaster (Last Post : Paulo_Skylar@adobeforums.com - Replies : 0 - Views : 1 )           »          Query question/help (Last Post : trojnfn - Replies : 2 - Views : 3 )           »          CS4 Motion Editor issues (Last Post : aaronlyon - Replies : 4 - Views : 9 )           »          Bridge No Longer Rotates Automatically (Last Post : Michael_Palumbo@adobeforums.com - Replies : 1 - Views : 2 )           »          dollarFormat / numberformat problem (Last Post : izdabye - Replies : 0 - Views : 1 )           »          Call out side flex (Last Post : Amy Blankenship - Replies : 15 - Views : 16 )           »          captions for photos (Last Post : dc111652 - Replies : 0 - Views : 1 )           »          Re: CS4 GPU Acceleration and Intel X3100 (Last Post : Paul_B_Brown@adobeforums.com - Replies : 0 - Views : 1 )           »          error 1034 (Last Post : shottogan - Replies : 0 - Views : 1 )           »          Keyboard events don't work in player or projector (Last Post : tunghoy - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-02-2008, 01:32 AM
|>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 11-02-2008, 01:32 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 11-02-2008, 01:32 AM
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 11-02-2008, 01:32 AM
|>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 11-02-2008, 01:32 AM
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 11-02-2008, 01:32 AM
|>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 03:43 AM.


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