Wish Constructor returns object

Daestrum

Expert
Licensed User
Longtime User
Would it be possible to have the constructors(initialize) return the object.

for example,
B4X:
    Dim AmenuItem As MenuItem
    Dim AList As List
    .......
    AmenuItem.Initialize("A","procA"))
    AList.Add(AmenuItem)
    ......
could become
B4X:
    AList.Add(AmenuItem.Initialize("A","procA"))
if the initialize for the menuItem returned the object instead of void.
 
Top