Ju Yang Active Member Licensed User Longtime User Jun 19, 2016 #1 Hi, I faced a strange problem with Msgbox2 and Pages. I used SideMenu, custom Navigation bar in my app. Everything was fine until I added some Msgbox2. It seems the Pages loaded again and again when I moved from page to page. It's hard to tell about it by word. Please try the attached sample project below. I do not know why this is so, can you give pointers about it? What is the main cause of the problem? thanks. Attachments problemwithmsgbox2.zip problemwithmsgbox2.zip 101.4 KB · Views: 402
Hi, I faced a strange problem with Msgbox2 and Pages. I used SideMenu, custom Navigation bar in my app. Everything was fine until I added some Msgbox2. It seems the Pages loaded again and again when I moved from page to page. It's hard to tell about it by word. Please try the attached sample project below. I do not know why this is so, can you give pointers about it? What is the main cause of the problem? thanks.
Erel B4X founder Staff member Licensed User Longtime User Jun 20, 2016 #2 1. You shouldn't load the layout in the resize event. 2. You shouldn't remove the layout in the Disappear event. The problem seems to be related to the replacement of the KeyController while the msgbox is still visible. I've tried it with this code and it worked properly: Code: Copy Sub Msg_Click(ButtonText As String) Main.csu.CallSubPlus(Me, "btNext_Click", 500) End Sub csu is a CallSubUtils object, declared and initialized in the Main module. https://www.b4x.com/android/forum/threads/callsubplus-callsub-with-explicit-delay.60877/#content Upvote 0
1. You shouldn't load the layout in the resize event. 2. You shouldn't remove the layout in the Disappear event. The problem seems to be related to the replacement of the KeyController while the msgbox is still visible. I've tried it with this code and it worked properly: Code: Copy Sub Msg_Click(ButtonText As String) Main.csu.CallSubPlus(Me, "btNext_Click", 500) End Sub csu is a CallSubUtils object, declared and initialized in the Main module. https://www.b4x.com/android/forum/threads/callsubplus-callsub-with-explicit-delay.60877/#content