Other B4A v7.01 has been released!

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm happy to release B4A v7.01. This update includes the new resumable subs feature. This is the most important programing language improvement since the addition of classes in B4A v2.
It makes it much simpler to manage asynchronous tasks.

Quoting @johndb :
This version sure does clean up the code without jumping from sub to sub to sub to ... to handle asynchronous processing in a very clean manner. This and the previous "multi-dex" features in my opinion are game changers for B4X.

Improvements:
  • Resumable subs - Wait For / Sleep: https://www.b4x.com/android/forum/threads/resumable-subs-sleep-wait-for.78601/#post-498072
    [B4X] SQL with Wait For
    [B4X] OkHttpUtils2 with Wait For
  • Async dialogs: https://www.b4x.com/android/forum/threads/doevents-deprecated-and-async-dialogs-msgbox.79578/
  • Variables and subs renaming based on the Find All References feature:

    rename-gif.53634


  • Quick search supports replacing including replacing in all modules.
  • Icon picker - Filter field supports filtering by hex code.
  • Starter service better handles cases where the process is started by multiple intents.
  • CSBuilder.Image adds an underscore instead of space to fix an issue with multiline strings.
  • Application_Error - Fixed a compatibility issue with Android 2.2.
  • PhoneCalls - READ_CALL_LOG permission added. This is a new requirement.
  • Sender is set when raising events with CallSub or CallSubDelayed from classes.
  • Debugger improvements related to deployments of large projects. It is recommended to upgrade B4A-Bridge to v2.31: https://play.google.com/store/apps/details?id=anywheresoftware.b4a.b4abridge&hl=en
  • DoEvents is deprecated. A warning will appear when using it (see the async dialogs tutorial). Note that it is still supported, exactly as before.
  • SQL library updated to make it simpler to use with Wait For.

Notes:
- B4A compiled libraries with service modules need to be recompiled.
- Java 8 is required (Tools - Configure Paths).

Developers who are eligible for a free upgrade will receive an email with upgrade instructions.
Other developers will receive an email with a discount offer.

Edit: v7.01 is available for download from the same link. It solves two bugs introduced in v7.00.
 
Last edited:

moster67

Expert
Licensed User
Longtime User
Thank you!
Btw: What is this referring to:
"Sender is set when raising events with CallSub or CallSubDelayed from classes."? Is there a related forum-post?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
"Sender is set when raising events with CallSub or CallSubDelayed from classes."? Is there a related forum-post?
It means that if you use CallSubX or CallSubDelayedX from a class then the Sender keyword can be used in the target sub. Sender will return the class instance.

This is very important for the new Wait For feature as it allows to set the sender filter parameter.

Consider this code:
B4X:
Dim j As HttpJob
j.Initialize("", Me)
j.Download("https://www.google.com")
Wait For (j) JobDone(j As HttpJob) 'JobDone is raised from HttpJob class with CallSubDelayed.
Log(j.Success)
j.Release
The Sender Filter is set to the local class instance. This allows multiple subs to Wait For the JobDone event. Each one will intercept the correct one based on the sender filter.
 
Upvote 0

Ahmad-Ng

Member
Licensed User
Great news. Thanks Erel. Anywhere software has broadened mine and most other users programming scope in a way no other software has. Thanks for the freedom!!!
 
Upvote 0

geoffschultz

Member
Licensed User
Longtime User
I just tried compiling an app that compiled just fine in the previous version and this is what I get. I have no idea how to interpret it:

B4X:
Organizing libraries.    (0.00s)
Generating R file.    (0.28s)
Compiling generated Java code.    (3.30s)
Convert byte code - optimized dex.    Error
java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Exception in thread "main"
 
Upvote 0

stanmiller

Active Member
Licensed User
Longtime User
Last edited:
Upvote 0

MarcoRome

Expert
Licensed User
Longtime User
I just tried compiling an app that compiled just fine in the previous version and this is what I get. I have no idea how to interpret it:

B4X:
Organizing libraries.    (0.00s)
Generating R file.    (0.28s)
Compiling generated Java code.    (3.30s)
Convert byte code - optimized dex.    Error
java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
Exception in thread "main"

Look THIS
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
right in time. thank you very much for your hard work @Erel

Dim j As HttpJob
j.Initialize("", Me)
j.Download(
"https://www.google.com")
Wait For (j) JobDone(j As HttpJob) 'JobDone is raised from HttpJob class with CallSubDelayed.
Log(j.Success)
j.Release

this is really a interesting code snipped.
so you can say:

wait for (j) [set the sender] Jobdone(j as HttpJob) [set the event]

the syntax is a little bit strange, it would be more simpler to do something like this

B4X:
Wait For JobDone(j)

ps if i have a job.release call in my HttpJob Class then i don't need to call it again (like in your example) right?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
the syntax is a little bit strange, it would be more simpler to do something like this
In this specific case the parameter is the same object. In many other cases the event signature is completely different. Wait For uses the same signature as the standard event handler subs. The only difference is the additional optional sender filter parameter.

ps if i have a job.release call in my HttpJob Class then i don't need to call it again (like in your example) right?
It is better to discuss it in a new thread.
 
Upvote 0
Top