- Dec 12, 2022
- 357
- 2
I need to call a routine in an activty from a service, but I need to make sure that only the routine will run and that no code in the Acitivty_Create sub will run.
From what I understand, if I try to use IsPaused(Main) it will return TRUE for either of these possible states:
1) Activity is loaded, but it is paused.
2) Activity is not loaded at all.
If it is in state #1 above, then I know when I do a CallSubDelayed(Main,"MyRoutine"), just the Activity_Resume and the MyRoutine subs will run, which is what I want.
But if it is in state #2 above, then when I call CallSubDelayed(Main,"MyRoutine"), the Activity_Create, (and maybe also Activity_Resume) and then MyRoutine subs will run, which is not good because I don't want the code in the Activity_Create to run.
So, how can I know which state Main is in?
(p.s. I don't know if a b4xpages app would work better for this issue, but at this point in time it is not practical...
From what I understand, if I try to use IsPaused(Main) it will return TRUE for either of these possible states:
1) Activity is loaded, but it is paused.
2) Activity is not loaded at all.
If it is in state #1 above, then I know when I do a CallSubDelayed(Main,"MyRoutine"), just the Activity_Resume and the MyRoutine subs will run, which is what I want.
But if it is in state #2 above, then when I call CallSubDelayed(Main,"MyRoutine"), the Activity_Create, (and maybe also Activity_Resume) and then MyRoutine subs will run, which is not good because I don't want the code in the Activity_Create to run.
So, how can I know which state Main is in?
(p.s. I don't know if a b4xpages app would work better for this issue, but at this point in time it is not practical...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید