Other B4A v7.01 has been released!

Discussion in 'Android Questions' started by Erel, May 24, 2017.

  1. Erel

    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 :
    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: Jul 2, 2017
  2. moster67

    moster67 Well-Known Member 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?
     
  3. rbghongade

    rbghongade Active Member Licensed User

    Fantastic as always! Huge thanks to Erel.
     
  4. gma

    gma Member Licensed User

    Great, thank you!
     
  5. Erel

    Erel Administrator Staff Member Licensed 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:
    Code:
    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.
     
    peacemaker, ilan, MarcoRome and 2 others like this.
  6. Johan Schoeman

    Johan Schoeman Expert Licensed User

    HI Erel - the gif above refers. Seems it is from B4J?
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    That's true. However it is exactly the same as in B4A.
     
    Johan Schoeman likes this.
  8. Jmu5667

    Jmu5667 Well-Known Member Licensed User

    Cool !
     
  9. Tadeu Botelho

    Tadeu Botelho New Member Licensed User

    Congratulations Erel.
    I really enjoyed the new features.
     
  10. jose luis gudino

    jose luis gudino Member Licensed User

  11. Ahmad-Ng

    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!!!
     
    jamesnz likes this.
  12. NeoTechni

    NeoTechni Well-Known Member Licensed User

    Amazing. You make the idea of using java on Android, downright scary.
     
    jamesnz likes this.
  13. geoffschultz

    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:

    Code:
    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"
     
  14. stanmiller

    stanmiller Active Member Licensed User

    Last edited: May 24, 2017
  15. MarcoRome

    MarcoRome Expert Licensed User

    Look THIS
     
    DonManfred likes this.
  16. MarcoRome

    MarcoRome Expert Licensed User

    Really Great, great work... fantastic B4X
     
  17. ilan

    ilan Expert Licensed User

    right in time. thank you very much for your hard work @Erel

    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

    Code:
    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?
     
  18. DonManfred

    DonManfred Expert Licensed User

    As written by erel.
    You need java 8. Update your java-installation and setup the path under Tools-configure paths.

     
    Jmu5667 and Peter Simpson like this.
  19. Erel

    Erel Administrator Staff Member Licensed User

    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.

    It is better to discuss it in a new thread.
     
  20. itgirl

    itgirl Active Member Licensed User

    Our favorite IDE is getting better and better with every update ❤ Erel ❤
     
    Toky Olivier and thinktank like this.
Loading...