Adobe Dreamweaver Forums



Last 10 THreads :         Adobe Flash 10 kills Wimpy (Last Post : midiwriter - Replies : 106 - Views : 107 )           »          Em Dash (Last Post : David Stiller - Replies : 1 - Views : 2 )           »          button event with transparency (Last Post : Kruc3fix - Replies : 0 - Views : 1 )           »          Dragging components (Last Post : hsfrey - Replies : 21 - Views : 22 )           »          Scaling .swf files to fit specific dimensions (Last Post : wolfsj - Replies : 2 - Views : 3 )           »          Table cell - text formatting question (Last Post : JRStaf4ord - Replies : 5 - Views : 6 )           »          Re: Your techiques for removing specular from photos (Last Post : Don_Gough@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: Colour differences on the web (Last Post : g_ballard@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: Colour differences on the web (Last Post : Jim_Jordan@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: Printing too dark in CS4 (Last Post : Tom_H_Mikkelsen@adobeforums.com - Replies : 0 - Views : 1 )           »         


Left Column Title

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



Reply
  #1 (permalink)  
Old 11-20-2008, 01:43 PM
Cr99
 
Posts: n/a
Diggs:
Default catching errors from remotely invoked processes

Ok, you know how sometimes the flash runtime throws an error in a popup window
with a stack trace that and let's you click 'dismiss' or 'cancel'. I need to
do something like that. My flex app gets invoked from a java process so I
can't use the debugger and trace statements. But the program is crashing and I
need to figure out why.

The program is receiving some arraycollections and needs to append those to
the arraycollections which are set up during initialization. These
arraycollections are data providers for some charts. I have to do everything
in actionscript. I set up the data binding like this.

BindingUtils.bindProperty(lineSeries, "dataProvider", ser, "pointList");

Here is the way I'm currently trying to append the new data and catch the
error, but this does not work.




try {
for (var i:int = 0; i<newArray.length; i++) {
oldArray.addItem(newArray.getItemAt(i));
}
} catch (err:Error) {
// code to react to the error
var errorMessage:TextField = new TextField();
errorMessage.autoSize = TextFieldAutoSize.LEFT;
errorMessage.textColor = 0xFF0000;
errorMessage.text = err.message;
addChild(errorMessage);
}



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-21-2008, 02:34 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: catching errors from remotely invoked processes


"Cr99" <webforumsuser@macromedia.com> wrote in message
news:gg3pc7$91h$1@forums.macromedia.com...
> Ok, you know how sometimes the flash runtime throws an error in a popup
> window
> with a stack trace that and let's you click 'dismiss' or 'cancel'. I need
> to
> do something like that. My flex app gets invoked from a java process so I
> can't use the debugger and trace statements. But the program is crashing
> and I
> need to figure out why.


throw new Error("This is what you'll see in the error window");


Reply With Quote
  #3 (permalink)  
Old 11-21-2008, 06:14 PM
Cr99
 
Posts: n/a
Diggs:
Default Re: catching errors from remotely invoked processes

Amy, thanks for your help. Where is the error message supposed to appear? In
a pop-up? In the console? I tried adding this line in the code in various
ways but it never fired any kind of notification.

Reply With Quote


  #4 (permalink)  
Old 11-21-2008, 07:53 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: catching errors from remotely invoked processes


"Cr99" <webforumsuser@macromedia.com> wrote in message
news:gg6tgv$chs$1@forums.macromedia.com...
> Amy, thanks for your help. Where is the error message supposed to appear?
> In
> a pop-up? In the console? I tried adding this line in the code in
> various
> ways but it never fired any kind of notification.


You have to be on a machine with the debug player installed.


Reply With Quote
  #5 (permalink)  
Old 11-21-2008, 08:13 PM
Cr99
 
Posts: n/a
Diggs:
Default Re: catching errors from remotely invoked processes

I do have the debug player installed. It works fine for trace() but since I
don't launch this myself, I don't know how to enable the debug mode. This app
gets launched remotely from a Java process. Is there a way for me to turn on
the debug mode in an app which is already running?

Reply With Quote
  #6 (permalink)  
Old 11-21-2008, 08:35 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: catching errors from remotely invoked processes


"Cr99" <webforumsuser@macromedia.com> wrote in message
news:gg74k7$l31$1@forums.macromedia.com...
>I do have the debug player installed. It works fine for trace() but since
>I
> don't launch this myself, I don't know how to enable the debug mode. This
> app
> gets launched remotely from a Java process. Is there a way for me to turn
> on
> the debug mode in an app which is already running?


I get debug messages from swf files embedded in an Authorware exe, so unless
Java is suppressing them somehow you should see them. Try it with a simple
app that just throws an error.


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



Right Column Title


© 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 09:53 PM.


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.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk