topical media & game development

talk show tell print

professional-flex-code-26-TracePanelTarget.ax

professional-flex-code-26-TracePanelTarget.ax [swf] flex


  package 
  {
  
  import mx.core.mx_internal;
  import mx.controls.TextArea;
  import mx.logging.targets.LineFormattedTarget;
  
  use namespace mx_internal;
  
  
The <code>@ax-professional-flex-code-26-TracePanelTarget</code> extends the <code>LineFormattedTarget</code> class to provide a basic output mechanism. This target requires a reference to a <code>TextArea</code> object. The <code>@ax-professional-flex-code-26-TracePanelTarget</code> uses the reference to the <code>TextArea</code> object to output message line by line.
see: mx.logging.targets.LineFormattedTarget

  
  public class @ax-professional-flex-code-26-TracePanelTarget extends LineFormattedTarget {
  
    
Constructor.
parameter: console Reference to a TextArea object that will display the output of the messages.

  
    public function @ax-professional-flex-code-26-TracePanelTarget( console:TextArea ) {
      super();
      this.console = console;
    }
      
    
@private

  
    private var console:TextArea;
   
    
The <code>internalLog</code> method handles the sending of messages.
parameter: message The message to be logged by this target.

  
    override mx_internal function internalLog(message:String):void
    {
      console.text += message + "\n";
    }
      
  }
  }
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.