I found I can call a sub on a different page which has either a lower case or upper case start to the name but only if it is not expecting data.
I can call page2.test or page 2.Test.
However if test is configured to receive a variable it only works if the sub is called Test but not test.
Must sub names start with a Capital or am I missing something?
My initial example of Test was misleading and incorrect. However when trying to follow Erel's Qrcode generator example I found that :-
B4X:
Public Sub SetQRstring(s As String)
ImageView1.SetBitmap(generator.Create("s"))
End Sub
Can be called but :-
B4X:
Public Sub setQRstring(s As String)
ImageView1.SetBitmap(generator.Create("s"))
End Sub
Can not be called.
Experimenting seems to confirm it is related related to the word Set or set as the beginning of a sub name. Thanks to the pointer on that from Luca
My initial example of Test was misleading and incorrect. However when trying to follow Erel's Qrcode generator example I found that :-
B4X:
Public Sub SetQRstring(s As String)
ImageView1.SetBitmap(generator.Create("s"))
End Sub
Can be called but :-
B4X:
Public Sub setQRstring(s As String)
ImageView1.SetBitmap(generator.Create("s"))
End Sub
Can not be called.
Experimenting seems to confirm it is related related to the word Set or set as the beginning of a sub name. Thanks to the pointer on that from Luca
Basic4android v2.00 adds support for classes modules. Classes definition from Wikipedia: In object-oriented programming, a class is a construct that is used to create instances of itself – referred to as class instances, class objects, instance objects or simply objects. A class defines...