mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
little fixes: returing new instance
This commit is contained in:
parent
b317d390f6
commit
235476fee4
@ -29,9 +29,9 @@ end
|
||||
function M.register(name, module)
|
||||
-- TODO: Find better solution to creating elements?
|
||||
_factory["new_" .. name] = function(factory, node_or_name, ...)
|
||||
_factory.new(factory, module, node_or_name, ...)
|
||||
end
|
||||
log("Register component", name)
|
||||
return _factory.new(factory, module, node_or_name, ...)
|
||||
end
|
||||
log("Register component", name)
|
||||
end
|
||||
|
||||
--- Create UI instance for ui elements
|
||||
@ -92,6 +92,8 @@ function _factory.new(factory, module, node_or_name, ...)
|
||||
if instance.init then
|
||||
instance:init(...)
|
||||
end
|
||||
|
||||
return instance
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user