No announcement yet.

PluriBASIC - Changes

  • Filter
  • Time
  • Show
Clear All
new posts

  • PluriBASIC - Changes

    I thought it would be a good idea to start a thread with the list of changes made. So i will try to keep up with bug fixes anc improvements.

  • #2

    This option was not resetting back to default (for PB-CGI) when inserted and then removed the command. Fixed it.


    • #3
      PB-CGI : WEB_NAVIGATE is now thread-safe. Now you can download several HTML pages at the same time.
      PHP : Fixed MYSQL_ERROR. It was working fine when PluriBASIC needed to generate MYSQL statements, but was retuning an empty string when PluriBASIC generated MYSQLI statements..
      PHP & PB-CGI : Added a special option: HTTPS, which will save CSS content with an HTTPS prefix instead of an HTTP one.
      PHP & PB-CGI : Added #CSSPATH, which allows to specify a subdirectory to save generated CSS content to.
      PB-CGI : Fixed the UDT count for udts that contain elements with the name "type". The engine was counting the element as a new
      type and generating a cgi that crashed.
      PB-CGI : UDT elements of type STRING with no specified length, will have a default length of 255, but for database queries will generate a field of type TEXT instead of VARCHAR(255).


      • #4
        PB-CGI : FORMFIELD was ignoring the last form field for non multi-part forms. Fixed it as well.


        • #5

          Fix and improvement. Android's DDT textboxes' hint text was not being displayed in some devices.

          CONTROL SET HINT has been assigned a default color (lite gray) for devices that do not have a default color for textboxes' hint text.

          It has also been added a way to change the default color for hint text:

          Add a hint with default color:
          [FONT="Courier New"][B]
          [COLOR="Blue"]CONTROL[/COLOR] [COLOR="Blue"]SET[/COLOR] [COLOR="Blue"]HINT[/COLOR] [COLOR="Black"]hDlg[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Red"]%ID_TEXTBOX1[/COLOR][COLOR="Black"],[/COLOR] [COLOR="DarkGreen"]"This is the hint for textbox"[/COLOR][/B][/FONT]
          Add a hint with a custom text color:
          [FONT="Courier New"][B]
          [COLOR="Blue"]CONTROL[/COLOR] [COLOR="Blue"]SET[/COLOR] [COLOR="Blue"]HINT[/COLOR] [COLOR="Black"]hDlg[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Red"]%ID_TEXTBOX1[/COLOR][COLOR="Black"],[/COLOR] [COLOR="DarkGreen"]"This is the hint for textbox"[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Blue"]RGB[/COLOR][COLOR="Black"]([/COLOR][COLOR="Black"]255[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Black"]0[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Black"]0[/COLOR][COLOR="Black"])[/COLOR][/B][/FONT]
          Also, under some devices when the LogCat is too big, or the device is out of storage space or the PC used for compiling process (mostly windows 10 OS's) has ADB-incompatible drivers, the compiling process may hang for a long time or forever. This is due to the Android system (ADB), and not PluriBASIC's, but now the compiling process states when the compiling process is doing such tasks. Those thasks are cancellable. Updating drivers may help on the last instance of the problem.

          Update installer is online now.


          • #6
            A few more updates and fixes for Android compilations:

            The integrated custom control "datepicker" now can take a DATE$ in the caption's field. Actually the date can be anything text. Even a direct literal string or a variable containing a valid date representation:

            [FONT="Courier New"][B]
            [COLOR="Blue"]CONTROL[/COLOR] [COLOR="Blue"]ADD[/COLOR] [COLOR="DarkGreen"]"datepicker"[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Black"]hDlg[/COLOR][COLOR="Black"],[/COLOR] [COLOR="DarkGreen"]"datetime"[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Blue"]GREGORIAN[/COLOR][COLOR="Black"]([/COLOR][COLOR="Black"]JulianDate[/COLOR][COLOR="Black"])[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Black"]20[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Black"]100[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Black"]300[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Black"]200[/COLOR][COLOR="Black"],[/COLOR] [COLOR="Black"]0[/COLOR][COLOR="Black"][/COLOR][/B][/FONT]
            Also, the default date for datepicker custom control will now be today's date instead of a hard coded wrong date.

            Some controls were being kept on top of popup dialogs. That has been fixed as well. And the solution worked so well, that in the future we may implement a statement to modify the Z order of controls and popup dialogs. I will tie a string to my finger.

            Gave a little more bytes to the GIF engine, for those cases where the GIF engine assumes it has some extra bytes to use as a buffer. This applies to the GIF sprites and the GIFVIEW control that displays the animated image.


            • #7
              We have updated the popup dialog Z order features (which was failing on some devices), please let us know if you experience errors with some device. We tested on several with successful results in all of them.
              Last edited by Brian Alvarez; 17 Aug 2017, 10:51 PM.


              • #8
                Added MKTIME() for Android.


                • #9
                  Fixed a bug in the Android engine, where, if you create a script with database open, and then you add a service to it, and the service does not have any database functions in the service functions, an error is raised while compiling.


                  • #10
                    Android: The ZIPALIGN feature can now be used individually for each script by adding the ZIPALIGN flag on the #OPTIONS meta-statement. This feature is necessary if you want to release your app on the PlayStore.

                    As a reminder, remember that you can set the version for your Android APP using the 3rd field of the #VERSION meta-statement. As follows:

                    [COLOR=#0000CD][B]#VERSION AUTO, AUTO[/B][/COLOR], 1.00
                    Version is also necessary for uploading your app to the PlayStore or to upload upgrades.

                    Android: STATIC functions can now be used. Since messages for callback functions are received on different threads, it was possible that a button could be quickly pressed more than once, invoking a function 1 time for each press. If the intention is to invoke only once (for example if you are popping up a dialog), the invoked dialog can be placed in a STATIC FUNCTION. Just add the STATIC keyword before the FUNCTION keyword on the function statement. The function will be flagged as "busy" until it executes an EXIT FUNCTION statement or until it reaches an END FUNCTION statement. Its not recommended to use a return statement on JAVA code in STATIC FUNCTIONs, because in those cases the function will not be marked as "not busy", making it impossinle to execute again. You can also create STATIC SUBs and STATIC FASTPROCs. Static modules are not necessary (AFAIK) for PowerBASIC or PHP, but soon the syntax will be compatible for those.

                    Android: Image resources are now available also for services. Now you can use them to raise notifiations as follows:

                    [COLOR=#0000CD][B]#RESOURCE[/B][/COLOR] Alert,    [COLOR=#006400][B]"alert_sound.mp3"[/B][/COLOR]
                    [COLOR=#0000CD][B]#RESOURCE[/B][/COLOR] SomeIcon, [COLOR=#006400][B]"alert_icon.png"[/B][/COLOR]
                    [COLOR=#0000CD][B]NOTIFICATION[/B][/COLOR](319, [COLOR=#006400][B]"Notification title", "Notification description."[/B][/COLOR], SomeIcon, Alert)   [COLOR=#DDA0DD]'319 is just an ID for the notification.[/COLOR]
                    Android: LISTVIEWs can now contain sub-headers mixed between the list elements. To add them, just add "header" as the 3rd CHR$(0) separated text field. As follows:

                    Elements(Index) =  [COLOR=#006400]"Column 1"[/COLOR] & [COLOR=#0000CD][B]$TAB[/B][/COLOR] & [COLOR=#006400]"Column 2"[/COLOR] & [COLOR=#0000CD][B]CHR$[/B][/COLOR](0) & [COLOR=#006400]"row tag"[/COLOR] & [COLOR=#0000CD][B]CHR$[/B][/COLOR](0) &[COLOR=#006400] "header"[/COLOR]
                    The elements array can then be placed on the Listview with:

                    [COLOR=#0000CD][B]LISTVIEW SET ARRAY [/B][/COLOR]hDlg, [COLOR=#006400]"lista"[/COLOR], Elements()
                    Note: For now, listviews for Android are limited to 2 columns unless you design a dialog for each row (yes, you can do that).
                    Last edited by Brian Alvarez; 23 Aug 2017, 04:22 PM.


                    • #11
                      Android: There is a newer, faster and overall better Bridge app now (will be uploading it to the Play Store later).
                      Android: The IDE interacts better with the Bridge Now.
                      Android :Fixed a bug in which the change from upper case to lowercase of the Package name would raise low level compile-time errors.
                      Android: Improved DOWNLOADFILE function.
                      Android: Fixed CONTROL ENABLE for checkboxes (it was checking them instead of activating them).

                      There is a new offer for PluriBASIC in the purchase page, make sure to check it out.


                      • #12
                        I will be improving the bridge soon even further, if you have suggestions plrease let me know.


                        • #13
                          Android: Dialogs created with %WS_POPUP style can now also be combined with %WS_INVISIBLE, so that dialogs with many controls do not have to be created every time, but simply hidden. This speeds up displaying dialogs up to 2000% after the first open. DIALOG SHOW STATE has been updated accordingly. Just remember to hide popup dialogs (DIALOG SHOW STATE) instead of closing them (DIALOG CLOSE).

                          Android: Controls created with the %WS_TOUCHES style can now hold different colors for the normal and pushed states. Simply use this:
                          [FONT=Courier New][B][COLOR=Blue]DIALOG[/COLOR] [COLOR=Blue]DEFAULT[/COLOR] [COLOR=Blue]STYLE[/COLOR]  [COLOR=Black]hDlg[/COLOR][COLOR=Black],[/COLOR] [COLOR=Red]%STYLE_COLORS[/COLOR][COLOR=Black],[/COLOR]      [COLOR=Blue]RGB[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]255[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]255[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]255[/COLOR][COLOR=Black])[/COLOR][COLOR=Black],[/COLOR] [COLOR=Blue]RGB[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]200[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]0[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]0[/COLOR][COLOR=Black])[/COLOR][COLOR=Black],[/COLOR] [COLOR=Blue]RGB[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]200[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]200[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]200[/COLOR][COLOR=Black])[/COLOR]
                          [COLOR=Blue]CONTROL[/COLOR] [COLOR=Blue]ADD[/COLOR] [COLOR=Blue]BUTTON[/COLOR][COLOR=Black],[/COLOR]   [COLOR=Black]hDlg[/COLOR][COLOR=Black],[/COLOR] [COLOR=DarkGreen]"cancel"[/COLOR][COLOR=Black],[/COLOR] [COLOR=DarkGreen]"Cancel"[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]10[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]170[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]120[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]30[/COLOR][COLOR=Black],[/COLOR] [COLOR=Red]%WS_TOUCHES[/COLOR][/B][/FONT]
                          Note that instead of RGB, you can also use ARGB to display transparent colors.

                          Android: The width in pixels of a text string can now be retrieved with CANVAS GET EXTENT. This allows to create metric accurate labels drawn manually. Like this:

                          [FONT=Courier New][B]    [COLOR=Silver]' Get the text width in pixels.[/COLOR]
                          [COLOR=Blue]CANVAS[/COLOR] [COLOR=Blue]GET[/COLOR] [COLOR=Blue]EXTENT[/COLOR] [COLOR=Black]Cb.hwnd[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]YearString[/COLOR] [COLOR=Blue]TO[/COLOR] [COLOR=Black]TextSize[/COLOR]            
                          [COLOR=Silver]' Center the text in X2.[/COLOR]
                          [COLOR=Blue]CANVAS[/COLOR] [COLOR=Blue]DRAW[/COLOR] [COLOR=Blue]TEXT[/COLOR] [COLOR=Black]Cb.hwnd[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]YearString[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]X2[/COLOR][COLOR=Black]-[/COLOR][COLOR=Blue]INT[/COLOR][COLOR=Black]([/COLOR][COLOR=Black]TextSize[/COLOR][COLOR=Black]/[/COLOR][COLOR=Black]2[/COLOR][COLOR=Black])[/COLOR][COLOR=Black],[/COLOR] [COLOR=Black]App.RulerY[/COLOR][/B][/FONT]
                          Android: Improved SELECT CASE for float values. It now uses another aproach. Still plan to add couple more details.

                          Android: CANVAS DRAW RECTANGLE has been improved to omit the borderline for widths of 0. Android was drawing a hairline in case the width for border was 0 (by design).

                          Android: CANVAS DRAW POLYGON has been improved to omit the borderline for widths of 0. Android was drawing a hairline in case the width for border was 0 (by design).

                          Android: %WM_MOUSEMOVE now includes information about all the touches being performed on the screen, and it has wider support on many devices, newer and older.

                          Android: Various minor changes and cosmetic improvements of low relevance.


                          • #14
                            Android: Removed some redundant code that was useless and was slowing down the creation of dialogs a lot when using DIALOG DEFAULT STYLE.


                            • #15
                              Android: Control styles can now directly contain the %WS_TABSTOP, %WS_NEXT and %WS_DONE styles instead of havint to specify them in the DEFAULT STYLES.
                              Android: MYSQL_UPDATE_UDT was not embedding the dependency MYSQL_WHERE in the generated source code. It was depending on some other function to include it but when invoked alone, the dependency was missing.
                              Android: Since last update (one week ago) UDT direct copy was failing. Now it works properly.
                              Android: Better behavior of DIALOG SHOW STATE for dialogs with the %WS_POPUP styles.
                              Android: Error 221 (Expected * Keyword) was being displayed as error 2210, causing a lot of confusion. Corrected the error number.
                              Android: Added DIALOGVISIBLE function, which returns -1 when the dialog is visible and 0 when hidden.



                              • #16
                                Android: MID$ syntax now supports the same functionality as the MID$ statement to assign new characters to a portion of a string.
                                PHP: MID$ statement was fixed and it now produces the same effect as PowerBASIC and it's Java and Android versions.


                                • #17
                                  Out of necessity today i updated PluriBASIC 5.0 support for Android.
                                  • It now supports applications up to API 29.
                                  • WEB_NAVIGATE now supports HTTPS calls.
                                  If Use PluriBASIC to compile Android Apps and need to target newer OS's.. please contact me privately (this update is still not up for download).