S Scantech Well-Known Member Licensed User Longtime User Sep 4, 2024 #1 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: Sep 4, 2024
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
teddybear Well-Known Member Licensed User Sep 5, 2024 #2 Scantech said: 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 Click to expand... 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
Scantech said: 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 Click to expand... 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