tsteward Well-Known Member Licensed User Longtime User Dec 26, 2016 #1 My very large app works great most of the time. If the app is not closed and is left in the background sometimes when you run it again I get certain object have not been initialized error. I cant get this to happen in debug mode so its not always easy to find, I was wondering what is the best practice in this case. Is it better to check and initialize on the Activity_Resume sub rather than Activity_Create? Should my app somehow expire after a certain time period?
My very large app works great most of the time. If the app is not closed and is left in the background sometimes when you run it again I get certain object have not been initialized error. I cant get this to happen in debug mode so its not always easy to find, I was wondering what is the best practice in this case. Is it better to check and initialize on the Activity_Resume sub rather than Activity_Create? Should my app somehow expire after a certain time period?
Erel B4X founder Staff member Licensed User Longtime User Dec 27, 2016 #2 tsteward said: I was wondering what is the best practice in this case. Click to expand... Initialize all public process global variables in Service_Create of the Starter service. Upvote 0
tsteward said: I was wondering what is the best practice in this case. Click to expand... Initialize all public process global variables in Service_Create of the Starter service.
tsteward Well-Known Member Licensed User Longtime User Dec 27, 2016 #3 Erel said: Initialize all public process global variables in Service_Create of the Starter service. Click to expand... Ok being an older app until the earlier this week I hadn't added Starter service, but have now. I think the initialization problem I'm having is for thing like Ultimate list view or sliding menu etc where I only have them on some activities not all. There are about 12 activities in total, I create and initialize each library when opening said activity. So I can't do it in the Service_Create, can I? Upvote 0
Erel said: Initialize all public process global variables in Service_Create of the Starter service. Click to expand... Ok being an older app until the earlier this week I hadn't added Starter service, but have now. I think the initialization problem I'm having is for thing like Ultimate list view or sliding menu etc where I only have them on some activities not all. There are about 12 activities in total, I create and initialize each library when opening said activity. So I can't do it in the Service_Create, can I?
Erel B4X founder Staff member Licensed User Longtime User Dec 28, 2016 #4 tsteward said: So I can't do it in the Service_Create, can I? Click to expand... You don't need to. Just make sure they are always initialized when the activity is created. Upvote 0
tsteward said: So I can't do it in the Service_Create, can I? Click to expand... You don't need to. Just make sure they are always initialized when the activity is created.