From c001c1b19cf46b5db0c7abfe3d92aad0f49282b0 Mon Sep 17 00:00:00 2001 From: Martin Peach Date: Tue, 31 Jan 2012 22:21:16 +0000 Subject: Right-click opens .pdlua script in an editor. .pdluax still doesn't work unless script is in same directory Pd was started from. svn path=/trunk/externals/loaders/pdlua/; revision=15930 --- src/pd.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/pd.lua') diff --git a/src/pd.lua b/src/pd.lua index 36ba28d..311330d 100644 --- a/src/pd.lua +++ b/src/pd.lua @@ -83,6 +83,13 @@ pd._whoami = function (object) end end +--class method dispatcher +pd._get_class = function (object) + if nil ~= pd._objects[object] then + return pd._objects[object]:get_class() + end +end + -- prototypical OO system pd.Prototype = { } function pd.Prototype:new(o) @@ -288,6 +295,9 @@ end function pd.Class:whoami() return self._scriptname or self._name end +function pd.Class:get_class() -- accessor for t_class* + return self._class or nil +end local lua = pd.Class:new():register("pdlua") -- global controls (the [pdlua] object only) function lua:initialize(sel, atoms) -- cgit v1.2.1