Anyone no why when I call a sub from another activity it is being ignored?
I searched this error and saw a post saying you needed to call the sub from Activity Resume not Activity Create but I do have it in Activity Resume.
Here is my code from my "Settings" Activity
both CallSubs are being Ignored.
2) along the same line I am using logcat to view errors messages etc. Is there a way for getting more information. I am very much a noob and i am coming from App Inventor where you could "watch" each individual event which made it much easier to find where the problem is. I am finding I have Subs set up and they are just not firing or are missing something but they are not throwing up an error so i am :BangHead: trying to figure out why if there was a way to watch each event that would be fantastic.
I have attached an image from app inventor so people can see what i am talking about
Thanks
Edit: I found a work around although i still think it strange i cannot call a sub from another activity. I removed the code from Resume and placed it in Create.
I also had to copy the subs i was trying to call from Main Activity and paste them into my Settings Activity now it all works. I was hoping i didnt have to double up code to avoid slowing the app down but it seems to work ok.
I searched this error and saw a post saying you needed to call the sub from Activity Resume not Activity Create but I do have it in Activity Resume.
Here is my code from my "Settings" Activity
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("ScrollView")
ScrollView1.Height = 100%y
ScrollView1.Width = 100%x
ScrollView1.Panel.Width = ScrollView1.Width
ScrollView1.Panel.LoadLayout("laySettings")
End Sub
Sub Activity_Resume
CallSub(Main, "SelectdbD")
db.SelectWorkArea(2)
db.FirstRecord
CallSub(Main, "GetFields_2")
lblCDateDis.Text = cd
If CDeluxe = "True" Then
tbDeluxe.Checked = True
End If
End Sub
both CallSubs are being Ignored.
2) along the same line I am using logcat to view errors messages etc. Is there a way for getting more information. I am very much a noob and i am coming from App Inventor where you could "watch" each individual event which made it much easier to find where the problem is. I am finding I have Subs set up and they are just not firing or are missing something but they are not throwing up an error so i am :BangHead: trying to figure out why if there was a way to watch each event that would be fantastic.
I have attached an image from app inventor so people can see what i am talking about
Thanks
Edit: I found a work around although i still think it strange i cannot call a sub from another activity. I removed the code from Resume and placed it in Create.
I also had to copy the subs i was trying to call from Main Activity and paste them into my Settings Activity now it all works. I was hoping i didnt have to double up code to avoid slowing the app down but it seems to work ok.
Last edited: