This has always confused me...
When the program starts-up, it runs the Activity_Create routine and then it runs the Activity_Resume sub when it hits the end of Activity_Create.
This is what it says in the manual.
If I make the smallest program one can make, a "Hello World" program.
Sub Process_Globals
End Sub
Sub Globals
DimEditTextHelloBoxAsEditText
End Sub
Sub Activity_Create(FirstTime AsBoolean)
EditTextHelloBox.Initialize("EditTextHello")
Activity.AddView(EditTextHelloBox,0,20%y,100%x,50dip)
HelloWorld("Hello World")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed AsBoolean)
End Sub
Sub HelloWorld(Hello AsString)
EditTextHelloBox.Text = Hello
End Sub
It calls Activity_Resume after calling Activity_Create.
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
But... isn't it normal to do a
if FirstTime then
else
end if
in the Activity_Create routine... and wouldn't it be the same thing to put your code for Activity_Resume in the else part of the FirstTime if/then?
Is there some time that the system runs the Activity_Resume without first running Activity_Create?
Couldn't you just do all your Activity_Resume stuff after the FirstTime if/then, or is there some exception where it runs Activity_Resume without calling Activity_Create?
...
Or, is it because you MIGHT need to do MORE stuff than you did the very first time... so you put THAT stuff in the Activity_Resume area. I kind of get why you have two routines.