You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.
reflector = new Reflector(Fussy.needsFlashPlayerHack());
My idea is to set a private static var or const like that :
public class Fussy
{
public static const needsFlashPlayerHack:Boolean = checkFlashPlayerHack();
// ....
private static function checkFlashPlayerHack():Boolean
{
var versionNumber:String = Capabilities.version;
var versionArray:Array = versionNumber.split(",");
var osPlusVersion:Array = versionArray[0].split(" ");
var major:int = parseInt(osPlusVersion[1]);
var minor:int = parseInt(versionArray[1]);
var build:int = parseInt(versionArray[2]);
return !(major >= 10 && minor >= 1 && build >= 52);
}
public class Reflector implements IReflector
{
private var cache:Dictionary = new Dictionary();
public function Reflector()
{
}
public function forType(type:Class):XML
{
var description:XML = cache[type] as XML;
if (description)
{
return description;
}
description = describeType(type);
if (Fussy.needsFlashPlayerHack)
{
// ....
Thanks !
J.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello,
I think that the needsFlashPlayerHack method in the Fussy class can be optimized.
Currently you have an internal method :
http://github.com/sammyt/fussy/blob/master/src/uk/co/ziazoo/fussy/Fussy.as#L57
But in the test case you call it :
http://github.com/sammyt/fussy/blob/master/test/uk/co/ziazoo/fussy/ReflectorTest.as#L19
My idea is to set a private static var or const like that :
And you can change the Reflector class like this :
http://github.com/sammyt/fussy/blob/master/src/uk/co/ziazoo/fussy/Reflector.as#L7
public class Reflector implements IReflector
{
private var cache:Dictionary = new Dictionary();
Thanks !
J.
The text was updated successfully, but these errors were encountered: