Android Question B4XPage initialize as object

Scantech

Well-Known Member
Licensed User
Longtime User
I started my project 4 months ago. most of my page is missing (As Object) in Initialize function. When i added b4xpage today, it is included. I don't know why rest of my pages don't have it that way. B4XMainPage does not have it.

My question: should i add (As Object) to all my pages and include Return Me? Leave B4XMainPage without it?

New
B4X:
Public Sub Initialize As Object
    Return Me
End Sub
 
Last edited:

teddybear

Well-Known Member
Licensed User
My question: should i add (As Object) to all my pages and include Return Me? Leave B4XMainPage without it?

New
B4X:
Public Sub Initialize As Object
    Return Me
End Sub
No, it is not mandatory,It depends on whether you want to use this object or not,such as
B4X:
Dim somepage As Object=thispage.Initialize
or
thispage.Initialize
 
Upvote 0
Top