smile fixes
This commit is contained in:
@@ -64,6 +64,12 @@ class GroupView extends SpriteView implements IGroupView<Sprite> {
|
||||
return view;
|
||||
}
|
||||
|
||||
public function removeAllViews():Void {
|
||||
while (views.length > 0) {
|
||||
removeView(views[0]);
|
||||
}
|
||||
}
|
||||
|
||||
public function removeViewById(id:String):IView<Dynamic> {
|
||||
if (viewsById.exists(id)) {
|
||||
return removeView(viewsById.get(id));
|
||||
|
||||
@@ -22,6 +22,7 @@ interface IGroupView<C:Content> extends IView<C> {
|
||||
|
||||
public function addView(view:IView<Dynamic>):IView<Dynamic>;
|
||||
public function removeView(view:IView<Dynamic>):IView<Dynamic>;
|
||||
public function removeAllViews():Void;
|
||||
public function removeViewById(id:String):IView<Dynamic>;
|
||||
public function findViewById<V:IView<Dynamic>>(id:String, ?clazz:Class<V>):Null<V>;
|
||||
}
|
||||
@@ -66,6 +66,7 @@ class BaseURLLoader<T> extends BaseLoader<T> {
|
||||
override private function onError(e:Event):Void {
|
||||
var c:ICallback<T> = callback;
|
||||
var error:String = extrudeError(loader.data);
|
||||
if (error != null) error = url + ": " + error;
|
||||
dispose();
|
||||
c.callFail(error != null ? error : e);
|
||||
}
|
||||
|
||||
@@ -28,4 +28,14 @@ class Provider {
|
||||
throw new Error("Factory for\"" + i + "\" not found");
|
||||
}
|
||||
}
|
||||
|
||||
public static function build<T>(i:Class<T>, ?type:Dynamic):T {
|
||||
var key:Dynamic = (type == null) ? i : type;
|
||||
if (factories.exists(key)) {
|
||||
var instance:T = Type.createInstance(factories.get(key), []);
|
||||
return instance;
|
||||
} else {
|
||||
throw new Error("Factory for\"" + i + "\" not found");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user