NetConnection.getDebugConfig( )


NetConnection.getDebugConfig( ) Method Flash 6

retrieves an object containing the subscribed debug events
   myNetConnectionObject   .getDebugConfig( ) 

Returns

A NetDebugConfig object containing the currently subscribed events.

Description

The getDebugConfig( ) method is used to programmatically retrieve the currently subscribed events for the NetConnection Debugger panel.

Example

The following code shows the basic syntax of the getDebugConfig( ) method and how it might be used:

 #include "NetDebug.as" #include "NetServices.as" NetServices.setDefaultGatewayURL("http://localhost/flashservices/gateway"); var my_conn = NetServices.createGatewayConnection( ); var my_service = my_conn.getService("myService", this); my_conn.trace("Service Object created."); function onStatus (error) {   // Show error message   trace(error.description);   // Get the   NetDebugConfig   object   var debugConfig = my_conn.getDebugConfig( );   // Iterate through the properties of the   NetDebugObject   for (i in debugConfig) {     trace (i + ":" + debugConfig[i]);     // If the property is an object itself, iterate through its properties     for (j in debugConfig[i]) trace ("   " + j + ":" + debugConfig[i][j]);   } } 

In the code, a NetDebugConfig object is created when a service call fails, and the properties of the object are written to the Output window. Note that some of the properties of the NetDebugConfig object are objects themselves , so they will be written to the Output window as [object Object] . The properties give you information about your current debug settings.

See Also

NetConnection.getDebugId( ) , NetConnection.setDebugId( ) , the NetDebug class, the NetDebugConfig class; Chapter 13



Flash Remoting
Flash Remoting: The Definitive Guide
ISBN: 059600401X
EAN: 2147483647
Year: 2003
Pages: 239
Authors: Tom Muck

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net