Existing threads always say not to post but to start a new thread...seems a bit odd because one can end-up having to read multiple threads that cover a single issue
Anyway, I am pretty much a B4A newbie again after 10 years and really excited to be working with this awesome B4X ???
We developed an app more than 10 years ago and it has been running constantly, in many locations, controlling industrial machinery.
Originally, we didn't anticipate an issue with higher screen resolutions coming along but now I have to tackle this issue and it's going well.
In the original code, there are quite a few DoEvents. Reading the latest documentation, it is recommended to replace these with Sleep(0) but if I do this, I get all kinds of complaints:
I accept the fact that the code is probably at fault but does it matter if I decide to stick with the deprecated DoEvents, as in, will it bite me down the road?
Regards,
Craig
Anyway, I am pretty much a B4A newbie again after 10 years and really excited to be working with this awesome B4X ???
We developed an app more than 10 years ago and it has been running constantly, in many locations, controlling industrial machinery.
Originally, we didn't anticipate an issue with higher screen resolutions coming along but now I have to tackle this issue and it's going well.
In the original code, there are quite a few DoEvents. Reading the latest documentation, it is recommended to replace these with Sleep(0) but if I do this, I get all kinds of complaints:
Error occurred on line: 10603 (Main)
java.lang.RuntimeException: Object should first be initialized (Label).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:67)
at anywheresoftware.b4a.objects.TextViewWrapper.setTextSize(TextViewWrapper.java:121)
at phenix.thrive.main._callalertbox(main.java:5575)
at phenix.thrive.main._activity_resume(main.java:5550)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:201)
at phenix.thrive.main.afterFirstLayout(main.java:111)
at phenix.thrive.main.access$000(main.java:17)
at phenix.thrive.main$WaitForLayout.run(main.java:83)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
I accept the fact that the code is probably at fault but does it matter if I decide to stick with the deprecated DoEvents, as in, will it bite me down the road?
Regards,
Craig
Last edited: