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:
          CONTROL SET HINT hDlg, %ID_TEXTBOX1, "This is the hint for textbox"
          Add a hint with a custom text color:
          CONTROL SET HINT hDlg, %ID_TEXTBOX1, "This is the hint for textbox", RGB(255, 0, 0)
          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:

            CONTROL ADD "datepicker", hDlg, "datetime", GREGORIAN(JulianDate), 20, 100, 300, 200, 0
            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:

                    #VERSION AUTO, AUTO, 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:

                    #RESOURCE Alert,    "alert_sound.mp3"
                    #RESOURCE SomeIcon, "alert_icon.png"
                    NOTIFICATION(319, "Notification title", "Notification description.", SomeIcon, Alert)   '319 is just an ID for the notification.
                    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) =  "Column 1" & $TAB & "Column 2" & CHR$(0) & "row tag" & CHR$(0) & "header"
                    The elements array can then be placed on the Listview with:

                    LISTVIEW SET ARRAY hDlg, "lista", 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:
                          DIALOG DEFAULT STYLE  hDlg, %STYLE_COLORS,      RGB(255, 255, 255), RGB(200, 0, 0), RGB(200, 200, 200)
                          DIALOG DEFAULT STYLE  hDlg, %STYLE_TOUCHCOLORS, RGB(205, 205, 205), RGB(150, 0, 0), RGB(150, 150, 150)
                          CONTROL ADD BUTTON,   hDlg, "cancel", "Cancel", 10, 170, 120, 30, %WS_TOUCHES
                          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:

                              ' Get the text width in pixels.
                          CANVAS GET EXTENT Cb.hwnd, YearString TO TextSize            
                          ' Center the text in X2.
                          CANVAS DRAW TEXT Cb.hwnd, YearString, X2-INT(TextSize/2), App.RulerY
                          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.