fix named ts object method calling
This commit is contained in:
@@ -303,7 +303,10 @@ local tsObjectMeta = {
|
||||
for inh in objectInheritedMetas(rawget(t,'_tsClassName')) do
|
||||
if inh[name] then return inh[name] end
|
||||
end
|
||||
if tsIsFunctionNs(rawget(t,'_tsNamespace'), name) then
|
||||
if
|
||||
tsIsFunctionNs(rawget(t,'_tsNamespace'), name) or
|
||||
tsIsFunctionNs(rawget(t,'_tsName'), name)
|
||||
then
|
||||
return function(t, ...)
|
||||
local args = {...}
|
||||
local argsS = arglistToTs(args)
|
||||
@@ -921,10 +924,12 @@ end
|
||||
-- bl.new and bl.datablock
|
||||
local function createTsObj(keyword, class, name, inherit, props)
|
||||
local propsT = {}
|
||||
for k,v in pairs(props) do
|
||||
if not isValidFuncName(k) then
|
||||
error('bl.new/bl.datablock: invalid property name \''..k..'\'') end
|
||||
table.insert(propsT, k..'="'..valToTs(v)..'";')
|
||||
if props then
|
||||
for k,v in pairs(props) do
|
||||
if not isValidFuncName(k) then
|
||||
error('bl.new/bl.datablock: invalid property name \''..k..'\'') end
|
||||
table.insert(propsT, k..'="'..valToTs(v)..'";')
|
||||
end
|
||||
end
|
||||
|
||||
local objS = _bllua_ts.eval(
|
||||
|
||||
Reference in New Issue
Block a user