M MikiSoft New Member Licensed User Longtime User Dec 9, 2013 #1 Sub in activity module: B4X: Sub Load() StartService(Srvice) Srvice.prd.Add("LOL") Msgbox(Srvice.prd.Get(0), "") End Sub Service ("Srvice") module: B4X: Sub Process_Globals Dim prd As List End Sub Sub Service_Create prd.Initialize End Sub Sub Service_Start (StartingIntent As Intent) End Sub This code above doesn't work. Where I've mistaken?
Sub in activity module: B4X: Sub Load() StartService(Srvice) Srvice.prd.Add("LOL") Msgbox(Srvice.prd.Get(0), "") End Sub Service ("Srvice") module: B4X: Sub Process_Globals Dim prd As List End Sub Sub Service_Create prd.Initialize End Sub Sub Service_Start (StartingIntent As Intent) End Sub This code above doesn't work. Where I've mistaken?
thedesolatesoul Expert Licensed User Longtime User Dec 9, 2013 #2 Service_Create will actually execute AFTER Load has executed. So you need to initialize prd BEFORE you add any items to it. Upvote 0
Service_Create will actually execute AFTER Load has executed. So you need to initialize prd BEFORE you add any items to it.