Other languages might call it something like Self or This...although rare in a BASIC language in the area I'm wondering since it is the Return value, but is something like this possible (Lame example, but gets the point across):
The sub returns a button, so I'm just curious if it is an object yet or is it always required to dim a button in the function and then return it. Typing the code above makes it look like it is possible since the list comes up when I type "CustomButton.", but on compile it reports missing () like it is only a sub.
B4X:
Sub CustomButton(btnText As String) As Button
CustomButton.Initialize("btnClick")
CustomButton.Text = btnText
CustomButton.Typeface = Typeface.DEFAULT_BOLD
CustomButton.Gravity = Gravity.CENTER
End Sub
The sub returns a button, so I'm just curious if it is an object yet or is it always required to dim a button in the function and then return it. Typing the code above makes it look like it is possible since the list comes up when I type "CustomButton.", but on compile it reports missing () like it is only a sub.