我有一个奇怪的情况,我不明白为什么,我已经实现了IEventDispatcher接口没有编制,我得到Error: Call to a possibly undefined method addEventListener和Error: Call to a possibly undefined method removeEventListener.
我很有可能在这里做一些令人难以置信的愚蠢的事情,我只是不知道它是什么......
以下是Class中抛出这些错误的方法(意味着在setTransformListner和"removeTransformListener"主体中处理"view"的方法:
public function setTransformListener(view:AbstractView):void
{
view.addEventListener(CustomEvent.TRANSFORM, transform);
}
public function removeTransformListener(view:AbstractView):void
{
view.removeEventListener(CustomEvent.TRANSFORM, transform);
}
private function transform(e:CustomEvent):void
{
}
Run Code Online (Sandbox Code Playgroud)
这是Event Dispatcher Class ...
package view
{
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
public class AbstractView implements IEventDispatcher
{
private var _dispatcher:EventDispatcher;
public function AbstractView():void
{
_dispatcher = new EventDispatcher(this);
}
/* INTERFACE flash.events.IEventDispatcher */
public function addEventListener(type:String, listener:Function, useCapture:Boolean = …Run Code Online (Sandbox Code Playgroud) 试图获得一些东西,但想确保如果GameCenter是V2功能,我们可以在游戏已经结束后在App Store中添加它.这可以作为游戏应用程序的更新版本完成并推送,而不必强迫人们发现和下载全新的应用程序吗?
很难找到答案,只是想确保这是我们可以推迟的事情.