ItemCollection.exists (
http://code.google.com/p/haxetacy/source/browse/ASP__.hx#200
) uses a function _exists defined in __init__, but since __init__ is
compiled and placed in a {} block, so actually _exists is not exist
globally, so the exists method will fail in runtime.
Here below will work:
class ItemCollectionHelper {
static public function
exists(c:ItemCollection<Dynamic>,key:String):Bool {
return c.item(key)!=c.item(' ~DUMMY`');
}
}
extern class ItemCollection<T> extends AssociativeCollection<T> {
inline function exists(key:String):Bool {
return ItemCollectionHelper.exists(this, key);
}
}