Share My Creation jMashBal2Bil Convertor

Discussion in 'iOS Share Your Creations' started by Mashiane, Jul 13, 2016.


Did you find this useful, if so what can be improved? Thanks :)

  1. Yes

    6 vote(s)
  2. No

    2 vote(s)
  1. Mashiane

    Mashiane Well-Known Member Licensed User


    NB: Now Updated to include a source code convertor, converting basic & simple source code from B4A to B4I. See Post #9

    I have wanted to do this for a while now. The current Bal2Bil convertor is a command based tool, so I wanted such a tool but as a nice UI. So after playing around, I used B4J to develop it.

    Will explain some things here about porting.


    Attached Files:

    Last edited: Jul 17, 2016
    Descartex and tufanv like this.
  2. tufanv

    tufanv Expert Licensed User

    Very usefull. Also there is no bil2bal. Maybe a tool for that would be nice too.
    Mashiane likes this.
  3. Mashiane

    Mashiane Well-Known Member Licensed User

    Will check it out, thankx
  4. Mashiane

    Mashiane Well-Known Member Licensed User

    Here is the B4J source code for the project including the library references used. I have updated it to include a folder selection and then you can convert a complete folder at once.

    NB: You need to copy Bal2Bil.exe to your Objects folder.

    Attached Files:

  5. jahswani

    jahswani Active Member Licensed User

    Please try expand it support B4J.
    Mashiane likes this.
  6. Mashiane

    Mashiane Well-Known Member Licensed User

    Hi there..

    I've noted that with using the jShell, at times as much as a success result is provided, the resulting b4i output file is somewhat corrupted. Thus I have updated the source code here to use an internal convertor as per source code from the Bal2Bil tool. I have not experienced any errors so far with my converted files. 27 screens to be exact.

    The attached source project thus does not need the exe file for bal2bil anymore as the source code is included. Anyway, the functionity to use the shell call is still here, previously this was RunWSH (dependency on bal2bil.exe) and now its RunWSH1 (no dependency).

    Other things to show here are:
    • Set a form's background image
    • Set a form's icon
    One can get some useful code from this site about B4J etc.


    Attached Files:

  7. Mashiane

    Mashiane Well-Known Member Licensed User

    If I can get similar code for a Bil2Bal convertor, I'm sure I can create something similar as this. Until that happens, unfortunately time is against me for that one. ;)
  8. Mashiane

    Mashiane Well-Known Member Licensed User

    Just a note, if your designer views have images in the Files Tab, you need to click Refresh for you to see images on the designer on your device.
    jahswani likes this.
  9. Mashiane

    Mashiane Well-Known Member Licensed User

    Hi there, I am converting a B4A app to B4i. I noticed that I was doing repetitive tasks, so I decided to create a b4j tool to help me convert my source code to b4i easily. This works just like a macro anyway.

    From the attached source code, take a look at jMash > replacers. This maps all code parts that I want to replaced from my b4a source code in the new b4i code.
    commentout is a list of all code parts that I want to be commented out if they start with such code. The code also fixes the StartActivity call.

    What you will have to do is to fix the Show method of your code module.

    Usage: Start jMashBal2Bil, open the Source Code Convertor, Copy and Paste your source code from an open B4A code module and click convert. Paste your code in a new b4i code module.

    For me this has decreased the number of repetitive tasks that I was performing.

    ''' initialize replacers, code on the left will be replaced with code on the right
    "Job.GetBitmapSample(100%x,100%y)""Job.GetBitmap"' personal
    "Activity_Create(FirstTime As Boolean)""Show")
    "(spinner)","(hd)")  ' personal
       replacers.Put("As EditText""As TextField")
    "As CustomListView""As iCustomListView")
    "As Cursor""As ResultSet")
    "Application.LabelName""modMashiane.AppName"' personal
       replacers.Put("Sub Globals","Sub Process_Globals")
    "As Spinner""As Picker")
    "As CheckBox""As Switch")
    ''' initialize things to comment out
    "Private msa "' personal
       commentout.Add("Private mst "' personal
       commentout.Add("Private spinner "' personal
       commentout.Add("Sub Activity_KeyPress"' YOU NEED TO FIND AND FIX THIS"

    Attached Files:

  10. carchek

    carchek Member Licensed User

    Hi, I have updated all the libraries and I get an Error: " Private rld As RLMessageDialog" That library is missing although I have installed the right library and updated Java.
  11. Mashiane

    Mashiane Well-Known Member Licensed User

    Can yo
    You propably downloaded the wrong library. Please ensure your library is jRLMessageDialogs.jar as there is also jRLDialogs8.jar from the same author.
  12. Descartex

    Descartex Active Member Licensed User

    Simply wonderful
    Mashiane likes this.
  13. imbault

    imbault Well-Known Member Licensed User

    Very usefull, thanks
  14. winjiadh

    winjiadh Active Member Licensed User

    I download your and all files.
    Unzip and run with B4J 4.7
    but error like this
    B4J version: 4.70
    Parsing code. (0.09s)
    Compiling code. Error
    Error compiling program.
    Error description: Unknown member: toasticonsize32x32
    Occurred on line: 85
    Word: toasticonsize32x32
  15. winjiadh

    winjiadh Active Member Licensed User

    download CustomToast
    it's all right
  16. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Hello Mashiane,

    Do you have some to do reverse? BIL 2 BAL?

    Thank you so much

    Alberto Iglesias
    Mashiane likes this.
  17. Mashiane

    Mashiane Well-Known Member Licensed User

    Not at all Sir!