iOS Question Problem with Msgbox2

susu

Well-Known Member
Licensed User
Longtime User
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.

Ps: I took me 2 days to find out Msgbox2 is the reason!
 

Attachments

  • problemwithmsgbox2.zip
    101.4 KB · Views: 183

Erel

B4X founder
Staff member
Licensed User
Longtime User
There are many programming errors in this code.
Some of them:

1. You need to create each page once and load the layout once.
2. Don't load the layout in the Resize event.
3. Don't create any UI element multiple times.
4. Don't remove the views in Page_Disappear.
5. Don't replace the KeyController every time. Instead replace it once.
 
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
For me, iOS's pages is harder to understand than Android's activities. Could you please make an example project base on my code? Then I can learn and avoid to make mistake again. Thank you so much.
 
Upvote 0

susu

Well-Known Member
Licensed User
Longtime User
I read that tutorial but I still not understand it. Maybe my English is not good.
The example code I wrote base on your tutorial but it's not correct.

I forgot to ask you, why my code works if there's no MsgBox2 ?
 
Upvote 0

Ju Yang

Active Member
Licensed User
Longtime User
I encountered the same problem,I do not know why this is so.Can you help me please?
 
Upvote 0

Ju Yang

Active Member
Licensed User
Longtime User
As I wrote there are several issues in your code. The problem is revealed when you show the msgbox. However the msgbox is not the cause of this problem.
What is the main cause of the problem?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…