Does MakeButton() have to return ID as a last thing?
Posted: Fri Oct 10, 2025 9:17 pm
Is there any technical reason that MakeButton Returns the ID as a last thing, as in:
Doesnt it anyway reserve the memoryspace as a first thing, hence it could return it as a first thing too?
My question is related to the situation where I would want to use this returned value already when declaring the button.
As in:
I know this is unconvential, and I do have a workaround for this, but I would rather if it could simply work with the before mentioned code to make the code much simpler and not rely on workaroundrefs.
Code: Select all
ID = MakeButton(NIL, X, Y...)My question is related to the situation where I would want to use this returned value already when declaring the button.
As in:
Code: Select all
IButtonD = MakeButton(Nil, X, Y, {MyFunc=Function() ButtonFunc(ButtonID) EndFunction) )