mirror of
https://github.com/Insality/druid
synced 2025-06-27 18:37:45 +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)
|
function M.register(name, module)
|
||||||
-- TODO: Find better solution to creating elements?
|
-- TODO: Find better solution to creating elements?
|
||||||
_factory["new_" .. name] = function(factory, node_or_name, ...)
|
_factory["new_" .. name] = function(factory, node_or_name, ...)
|
||||||
_factory.new(factory, module, node_or_name, ...)
|
return _factory.new(factory, module, node_or_name, ...)
|
||||||
end
|
end
|
||||||
log("Register component", name)
|
log("Register component", name)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Create UI instance for ui elements
|
--- Create UI instance for ui elements
|
||||||
@ -92,6 +92,8 @@ function _factory.new(factory, module, node_or_name, ...)
|
|||||||
if instance.init then
|
if instance.init then
|
||||||
instance:init(...)
|
instance:init(...)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return instance
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user