From 328d649ec9b351dcd9dc1f43d22b3aa587dc65e9 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 5 Sep 2012 02:49:17 +0200 Subject: removed map array access workaround fixed ChucK to handle them correctly --- lib/NanoEvent.ck | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/NanoEvent.ck b/lib/NanoEvent.ck index 29ad07a..17dec49 100644 --- a/lib/NanoEvent.ck +++ b/lib/NanoEvent.ck @@ -79,7 +79,7 @@ public class NanoEvent extends Event { msg.data1 & 0xF0 => int cmd; msg.data2 => CCId; - (__controlToName[scene])[CCId] @=> control; + __controlToName[scene][CCId] @=> control; if (control == "") { <<< "Unknown controller", CCId >>>; CCId => Std.itoa @=> control; @@ -120,11 +120,11 @@ public class NanoEvent extends Event { fun static void registerControl(string sceneName, int id, string controlName) { - if ((__controlToName[sceneName])[id] != "") + if (__controlToName[sceneName][id] != "") <<< "Warning: Already registered control", id, "on scene", sceneName >>>; - controlName @=> (__controlToName[sceneName])[id]; + controlName @=> __controlToName[sceneName][id]; } } /* static initialization */ -- cgit v1.2.3