From 6fd8baacbf915d100f22f267cc010cdf72505c7e Mon Sep 17 00:00:00 2001 From: "Shane M. Clements" Date: Thu, 5 Mar 2015 13:40:24 -0700 Subject: [PATCH] Fixed compile errors. Now trying to use the object's constructor to select the proper DisplayListAdapter. --- src/org/gestouch/core/Gestouch.as | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/org/gestouch/core/Gestouch.as b/src/org/gestouch/core/Gestouch.as index b3c23df..a05a313 100644 --- a/src/org/gestouch/core/Gestouch.as +++ b/src/org/gestouch/core/Gestouch.as @@ -45,14 +45,14 @@ package org.gestouch.core */ public static function get touchesManager():TouchesManager { - return _touchesManager ||= new TouchesManager(gesturesManager); + return _touchesManager ? _touchesManager : _touchesManager = new TouchesManager(gesturesManager); } private static var _gesturesManager:GesturesManager; public static function get gesturesManager():GesturesManager { - return _gesturesManager ||= new GesturesManager(); + return _gesturesManager ? _gesturesManager : _gesturesManager = new GesturesManager(); } @@ -106,6 +106,12 @@ package org.gestouch.core gestouch_internal static function getDisplayListAdapter(object:Object):IDisplayListAdapter { + // Try to find use the object's final class + var dla:IDisplayListAdapter = _displayListAdaptersMap[object.constructor as Class]; + if (dla) { + return dla; + } + for (var key:Object in _displayListAdaptersMap) { var targetClass:Class = key as Class;