bitetti

XMind2Lua LogManager

Mar 21st, 2011
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.wildwitchproject.rpgframework.logger
  2. {
  3.     import spark.components.TextArea;
  4.    
  5.     /**
  6.      * ...
  7.      * @author Bitetti
  8.      */
  9.     public class LogManager
  10.     {
  11.        
  12.         static private var _txt:TextArea;
  13.        
  14.         public function LogManager()
  15.         {
  16.             throw new Error("No no no!");
  17.         }
  18.        
  19.         static public function set textUI( t:TextArea ):void
  20.         {
  21.             _txt = t;
  22.         }
  23.        
  24.         static public function set message( t:String ):void
  25.         {
  26.             try
  27.             {
  28.                 _txt.appendText(t + "\n");
  29.                 trace( "LOG: " + t );
  30.             }
  31.             catch ( e:Error )
  32.             {
  33.             }
  34.         }
  35.     }
  36.  
  37. }
Advertisement
Add Comment
Please, Sign In to add comment