Hi,
I'm working on a videogame mobile starling project, using Gestouch since several month without any problem.
I recently update my libraries (Starling, Nape, Gestouch).But in my opinion it's not related to my problem..
I've got this gestouch error :essage when adding a gesture on a starling Image instance...
Main Thread (Suspended: Error: Cannot create adapter for target [class Sprite] of type starling.display::Sprite.)
On my main class I do gestouch initialization:
Gestouch.inputAdapter ||= new NativeInputAdapter(this.stage);
Gestouch.addDisplayListAdapter(starling.display.DisplayObject, new StarlingDisplayListAdapter());
Gestouch.addTouchHitTester(new StarlingTouchHitTester(this.starling), -1);
My sprite I'm adding on a gesture, is starling.display::Sprite
EDIT 1:
Ok I trace Gesture::_displayListAdaptersMap's content and get this class name:
flash.display::DisplayObject
starling.display::DisplayObject
EDIT 1:
Editing gestouch init:
Gestouch.inputAdapter ||= new NativeInputAdapter(this.stage);
Gestouch.addDisplayListAdapter(starling.display.DisplayObject, new StarlingDisplayListAdapter());
Gestouch.addDisplayListAdapter(starling.display.Sprite, new StarlingDisplayListAdapter());
Gestouch.addTouchHitTester(new StarlingTouchHitTester(this.starling), -1);
My previous trace become:
flash.display::DisplayObject
starling.display::Sprite
starling.display::DisplayObject
I's seem that Gesture::getDisplayListAdapter's test goes wrong..!!!?
gestouch_internal static function getDisplayListAdapter(object:Object):IDisplayListAdapter
{
trace('target:', getQualifiedClassName(object));
for (var key:Object in _displayListAdaptersMap)
{
var targetClass:Class = key as Class;
trace(getQualifiedClassName(targetClass));
if (object is targetClass)
{
return _displayListAdaptersMap[key] as IDisplayListAdapter;
}
}
return null;
}
EDIT3:
The more I'm progress, the more I'm seeing some bug in my recent codes, but I still can't explain Gesture::getDisplayListAdapter() test behavior.
Any clue ?
Thanks