AddElement arguments requirement inconsistencies.
gizzmo opened this issue · 2 comments
The AddElement method says that the Update
, Enable
, and Disable
functions are optional. But according to the code, they're not. I assume they're not meant to be, and it's just an incorrect docs issue.
Lines 852 to 860 in abdc99e
Line 113 in abdc99e
Line 144 in abdc99e
So Update
can be optional
Lines 116 to 118 in abdc99e
But it would make this loop pointless.
Lines 134 to 140 in abdc99e
Bonus bug I just noticed. The arg number is wrong in those argcheck
calls
The documentation is not wrong, it's the code
Lines 858 to 860 in abdc99e
It explicitly allows for nil. I'll take a look at it later just to make sure it does not break something and fix accordingly.
Bonus bug I just noticed. The arg number is wrong in those
argcheck
calls
Nope, self is the first argument.
thing:func(arg2, arg3)
is syntactic sugar for thing.func(thing, arg2, arg3)
Nope, self is the first argument.
Ah yeah, forgot about that.