package ExampleGCD { import flash.display.* ; import flash.events.* ; import mx.events.* ; import mx.controls.* ; import mx.core.* ; import flash.utils.Dictionary; import UU.Logging.* ; import UU.ISerialization.* ; import UU.SerializableDelegates.* ; import eu.fittest.actionscript.automation.* ; [Mixin] public class LoggingMixin { public static function init(top : DisplayObject):void { registerAutomationDelegates(top) ; top.addEventListener(FlexEvent.APPLICATION_COMPLETE,setupLogging) ; } static private function setupLogging(evt:Event) : void { //trace("** APP COMPLETE.." + evt.target) ; setStateAbstractionFunction() ; registerSerializationDelegates() ; // Turn on logging, currently set to just log top-level events // (no deep logging) // LoggingConf.enableLogging() ; LoggingConf.level = 5 ; // Hooking log-function: Automation.instance.addEventListener(RecordEvent.RECORD,logEvent); } // Just a helper function static private function logEvent(evt:Event) : void { LogUtils.logEvent(LoggingConf.MAXLEVEL,evt) ; } // To register relevant automation-delegates: private static function registerAutomationDelegates(top : DisplayObject) : void { var delegates : Array = [ ButtonDelegate, ButtonBarDelegate, ComboBoxDelegate, LabelDelegate, TextInputDelegate ] ; //trace("** #automation delegates = " + delegates.length) ; for (var i:uint=0; i