ExpansionManager.checkStatus() seems broken
https://github.com/alebianco/ANE-Android-Expansion/blob/master/source/actionscript/agnostic/src/eu/alebianco/air/extensions/expansion/ExpansionManager.as
switch(true)
{
case status && STATUS_SECURITY == 0:
{
message = "You havent configured the market security. Plase call setupMarketSecurity() to setup your data.";
break;
}
case status && STATUS_EXPANSIONS == 0:
{
message = "You haven't required any expansion file, so why bothering to use this extension at all?";
break;
}
}
I guess binary & was intended rather than logical && If I get it correctly then it never true now as neither 'STATUS_SECURITY == 0' nor 'STATUS_EXPANSIONS == 0' are true.
Also what's the point in writing it this way instead of if-else if?
absolutely right, rookie mistake on the operators. thanks for pointing it out.
the why is ... i like it better. especially when there're more statuses to handle i prefer a list of cases than a chain of if-elses. Technically there's no difference but i think it's easier on the eyes ...