Skip to content

Instantly share code, notes, and snippets.

@grapefrukt
Created July 6, 2011 07:19
Show Gist options
  • Save grapefrukt/1066731 to your computer and use it in GitHub Desktop.
Save grapefrukt/1066731 to your computer and use it in GitHub Desktop.
Provides a way to sidestep a local trace function to get at the global trace()
package {
import flash.display.Sprite;
/**
* ...
* @author Martin Jonasson (m@grapefrukt.com)
*/
public class TraceFixTest extends Sprite {
public function TraceFixTest():void {
trace("testing things", 123, "foo foo");
}
public function trace(... rest):void {
TraceFix.tracefix.apply(null, rest);
}
}
}
class TraceFix {
public static function tracefix(... rest):void {
trace.apply(null, rest);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment