0
開發環境:Flash Builder 4中,SDK 4.1ActionScript 3.0中 - 併發
源代碼:
if (ColonyHandler.getInstance() != null)
{
try
{
var colonyA:ColonyHandler = ColonyHandler.getInstance();
trace(colonyA);
ColonyHandler.getInstance().onMouseMove(event);
}
catch(error:*)
{
var colonyB:ColonyHandler = ColonyHandler.getInstance();
trace(colonyB);
}
}
問題:colonyA不爲空,colonyB爲空。 getInstance()方法返回名爲' 實例'的靜態變量。這可能嗎?
ColonyHandler.getInstance()??? – loxxy