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:

catster

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

Dear Erel,

Is all "J" in this code all refer to the same instance? or just reuse variable? so many "J" I feel confused.

Regards,
Steve
 
Upvote 0

Dey

Active Member
Licensed User
Longtime User
V7.01 is now available for download. It fixes two bugs related to the new resumable subs feature. I decided to release it early so developers who didn't download v7.00 yet will download the new version directly.

It is available from the same link as before.
thank you
now it's OK
:):):)
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Hi, thanks for your work.
After updating my project generate this error

B4X:
java.lang.RuntimeException: Object should first be initialized (Button).

it is related to this code line

B4X:
Sub AbilitaComandi(en As Boolean)
    Punto_avanti.enabled=en

The button is created in the designer and is declared in Globals

B4X:
    Dim Punto_avanti As Button
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
But the layout containing this button seems to be not loaded at this time.

I have discovered the MapFragment_Ready event is no longer triggered. Is that possible ?

edit: I reply by myself, no, it is not possible, I hav etested the GoogleMap sample and it works.
Need to investigate what's happened

edit2: found the trouble. I had a piece of code in Activity_create with a DoEvents. I don't remember why I put that. As suggested after installing B4A7, I have replaced all DoEvents inside my app with Sleep(0). This caused the layout not loaded correctly. With DoEvents all is ok.
 
Last edited:
Upvote 0

Cadenzo

Active Member
Licensed User
Longtime User
Thank you for the great update.
First I got an compiler error which I fixed by changing the javac.exe path as it is documented here.
Than the HttpUtils2 seems not to work, which I use for many of my projects. But after changing it with the recommended newer OkHttpUtils2 it works fine.
Now I am glad. I hope, I can just replace it everywhere in my projects to keep it working.
 
Upvote 0
Top