fix connect
This commit is contained in:
parent
24aab00431
commit
3b583bf331
|
@ -21,15 +21,16 @@ end
|
||||||
function connect(object, signalsAndSlots, pushFront)
|
function connect(object, signalsAndSlots, pushFront)
|
||||||
for signal,slot in pairs(signalsAndSlots) do
|
for signal,slot in pairs(signalsAndSlots) do
|
||||||
if not object[signal] then
|
if not object[signal] then
|
||||||
object[signal] = slot
|
object[signal] = slot
|
||||||
elseif type(object[signal]) == 'function' then
|
elseif type(object[signal]) == 'function' then
|
||||||
object[signal] = { object[signal], slot }
|
object[signal] = { object[signal] }
|
||||||
elseif type(object[signal]) == 'table' then
|
end
|
||||||
if pushFront then
|
if type(object[signal]) == 'table' then
|
||||||
table.insert(object[signal], 1, slot)
|
if pushFront then
|
||||||
else
|
table.insert(object[signal], 1, slot)
|
||||||
table.insert(object[signal], #object[signal]+1, slot)
|
else
|
||||||
end
|
table.insert(object[signal], #object[signal]+1, slot)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 763 B |
Binary file not shown.
Before Width: | Height: | Size: 660 B |
Binary file not shown.
Before Width: | Height: | Size: 459 B |
Binary file not shown.
Before Width: | Height: | Size: 928 B |
Binary file not shown.
Before Width: | Height: | Size: 415 B |
Loading…
Reference in New Issue