Other B4A v7.01 has been released!

Erel

Administrator
Staff member
Licensed 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:

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
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?
 

Erel

Administrator
Staff member
Licensed 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.
 

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!!!
 

geoffschultz

Member
Licensed 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"
 

stanmiller

Active Member
Licensed User
Last edited:

MarcoRome

Expert
Licensed 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
 

ilan

Expert
Licensed 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?
 

DonManfred

Expert
Licensed User

Erel

Administrator
Staff member
Licensed 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.
 
Top