iOS Question Panel click is working on debug not in release

Shay

Well-Known Member
Licensed User
This is working on debug mode

class_global:
private panel1 as panel

Sub Panel1_Click
PG.ResignFocus
HD.ToastMessageShow ("pressed",False)
End Sub

not in release, why? (not even toast is displaying)
 

stevel05

Expert
Licensed User
It works for me, what else do you have in the app?
 

Shay

Well-Known Member
Licensed User
I just tested again, also the button is not responding, clicking on it - nothing happen
only the TextFeilds are responding
I am using class and not modules
I am calling it like:
dim mypage as myclassx
mypage.initilize

moved to classes since I had other issue which pages are not cleared (once coming back to it, all the data was still there) so Erel told me to switch to classes
 

Shay

Well-Known Member
Licensed User
I replaced the panel and the button in the layout for new button/panel and now this issue also happen in debug mode, so the log I get is:
Event target instance was released: panel1_click
Event target instance was released: button1_click
 

Shay

Well-Known Member
Licensed User
...And now it is working on debug mode (changed the page in main to public), but again not in release mode
 

stevel05

Expert
Licensed User
Can you post the project? Or one that shows the problem.
 

Shay

Well-Known Member
Licensed User
Please clarify
you mean: sub global initialize?
since page as public did not help
 

Erel

Administrator
Staff member
Licensed User
It is hard to answer without going over your code.

You have created a class instance which should handle the layout events. You need to make sure that you keep a live reference to this class instance.

iOS doesn't have a powerful garbage collector such as Android / Java. It uses a much simpler mechanism (reference counting). It is your responsibility to keep references to your class instances.
 

Shay

Well-Known Member
Licensed User
I will try to explain my code, try to guide me (since only in the evening I can create some demo code)
I have main module, in there I have the NAV as global and page as global
other "pages" are in classes, code is copied from standard module (I just changed the sub name from "show" to "initialize"

on the classes the page need to be public or private?
is it need to be same name as page in main?

let say the page I want to go called "registerC"
so I do from main:
dim register as registerC
register.initilize
<And here I have this issue>
on register initialize sub, I am using main.nav.showpage
 

Shay

Well-Known Member
Licensed User
Thanks, I created public vars on main for each class
seems to solve the issue (still testing)
 
Top