-
This commit is contained in:
@@ -22,6 +22,8 @@ class FrameSwitcher extends GroupView implements IFrameSwitcher<Sprite> {
|
|||||||
}
|
}
|
||||||
current = frames.get(id);
|
current = frames.get(id);
|
||||||
addView(current);
|
addView(current);
|
||||||
|
var onShowMethod:Dynamic = Reflect.field(current, "onShow");
|
||||||
|
if (onShowMethod != null) Reflect.callMethod(current, onShowMethod, []);
|
||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package haxework.log;
|
package haxework.log;
|
||||||
|
|
||||||
|
#if flash
|
||||||
import flash.events.ErrorEvent;
|
import flash.events.ErrorEvent;
|
||||||
import flash.errors.Error;
|
import flash.errors.Error;
|
||||||
|
#end
|
||||||
import haxework.log.ILogger.LogLevel;
|
import haxework.log.ILogger.LogLevel;
|
||||||
|
|
||||||
class BaseLogger implements ILogger {
|
class BaseLogger implements ILogger {
|
||||||
@@ -17,6 +19,7 @@ class BaseLogger implements ILogger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function error2strign(error:Dynamic):String {
|
public static function error2strign(error:Dynamic):String {
|
||||||
|
#if flash
|
||||||
return if (Std.is(error, Error)) {
|
return if (Std.is(error, Error)) {
|
||||||
var stack:String = error.getStackTrace();
|
var stack:String = error.getStackTrace();
|
||||||
stack == null ? Std.string(error) : stack;
|
stack == null ? Std.string(error) : stack;
|
||||||
@@ -26,6 +29,9 @@ class BaseLogger implements ILogger {
|
|||||||
} else {
|
} else {
|
||||||
Std.string(error);
|
Std.string(error);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
return Std.string(error);
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
private function write(text:String, ?p:haxe.PosInfos):Void {}
|
private function write(text:String, ?p:haxe.PosInfos):Void {}
|
||||||
|
|||||||
Reference in New Issue
Block a user