I have all the booklets, plus the large .pdf file by Wyken Seagrave. I have looked and looked for the right info, and specific examples, but there is so much information available that I cannot find my way through the forest. I have uploaded a test project (in another post) if anyone wants to try their luck. Thank you.B4X:Sub Process_Globals 'These are Project Globals, "known" by the whole project' 'Only "Main" has these type of globals in B4Pages 'In classic Activities, each activity has a Process Global sub' 'Not all types can be process globals' Public ActionBarHomeClicked As Boolean End Sub Sub Globals 'These are Module Globals, known only throughout the Module they are declared on End Sub
The Starter.bas is a "service" that was introduced with B4Pages to ease the entry point specially when coming From Background to foreground (ie: the user sennds your app to background to consult an sms and then comes again into your app)
In the Activities framework, yhe app would be killed by the OS after some time, or when the OS needed the space... The starter service tries to keep the app alive, even if it's in background for long.
You should consult @klaus booklets about B4X, they are accessible from his signature
>> Only "Main" has these type of globals in B4Pages
If that is true, then why can't I compile my small project when I do this in "Main"?
Global variables not global variables:
Sub Process_Globals
Public ActionBarHomeClicked As Boolean
Public swe0 As SweDate
Public swe1 As SwissEph
Public JD, Transit(11), Speed(11) As Double
Public lnn(11), month_names(13), p_names(11) As String
Public vrs As String
Public num_bodies, sel_number, tz_offset As Int
Public ephem_codes(11) As Long
Public deltaT_val0(200), deltaT_val1(200), deltaT_val2(200) As Double
Public ae(2), deltaT As Double
End Sub
I get this error message:
B4A Version: 13.10
Parsing code. Error
Error parsing program.
Error description: Undeclared variable 'swe1' is used before it was assigned any value.
Error occurred on line: 60 (B4XMainPage)
swe1.swe_set_ephe_path(File.DirInternal)