Page 1 of 3

SpiderBasic 3.10 is out !

Posted: Mon Jun 02, 2025 8:38 am
by Fred
Hi there,

2025-07-30: We put a new final version online to fix 2 regressions, feel free to download it again if you already did it !

2025-07-28: Final is out, thanks for the feedback !

2025-06-30: Beta 2 is ready, with an updated doc for 3.10 and some new stuff:

Code: Select all

- Added: HeaderSection/EndHeaderSection to easily custozime the HTML </head> tag
- Added code signing for Windows installer and exe to avoid scary warning when installing
A new version of SpiderBasic is ready to test with some cool new features is available on your account !

Code: Select all

- Added: Android app creation support for Linux and MacOS !
- Added: New native notification library for mobile apps !
- Added: HTTPInfo() to get more info when using HTTPRequest()
- Added: HTTPTimeout() to control the timeout of HTTPRequest()
- Added: CopyMemory()
- Added: StringByteLength()
- Added: #PB_EventType_PageLoaded event support for WebGadget()
- Added: #PB_EventType_Resize support for ContainerGadget(), ScrollAreaGadget(), Canvas() and PanelGadget()
- Added: #PB_Image_Base64 flag for LoadImage() to load image encoded in Base64

- Updated: Cordova android 14 and Android SDK 35
- Updated: the Date library doc as it already supports date beyond 2038.
Here is an example for the new native notification lib:

Code: Select all

; You need to create an iOS or Android app to test it. It won't have any effect in the browser
;

; #PB_EventType_NotificationClicked
; #PB_EventType_NotificationTriggered

; #PB_Notification_Secret   ; Notification won't be shown on the lock screen
; #PB_Notification_Progress ; Progress-like notification (Android only)

; For ScheduleNotification():
;
; #PB_Notification_At
; #PB_Notification_InSecond
; #PB_Notification_InMinute
; #PB_Notification_InHour
; #PB_Notification_InDay
; #PB_Notification_InWeek
; #PB_Notification_InMonth
; #PB_Notification_InQuarter
; #PB_Notification_InYear
; #PB_Notification_EveryDate
; #PB_Notification_EveryMinute
; #PB_Notification_EveryHour
; #PB_Notification_EveryDay
; #PB_Notification_EveryWeek
; #PB_Notification_EveryMonth
; #PB_Notification_EveryYear

If ContainerMobile(#PB_Any, #PB_Mobile_Page, "margin:8px")
    HtmlMobile("<br><br>")
    HtmlMobile("<br><br>")
    HtmlMobile("<br><br>")
    HtmlMobile("<br><br>")
    HtmlMobile("<br><br>")
    HtmlMobile("<br><br>")
    HtmlMobile("<br><br>")
    HtmlMobile("<br><br>")
    HtmlMobile("<br><br>")
    ButtonMobile(0, "Click me")
    HtmlMobile("<br><br>")
    HtmlMobile("<br><br>")
    HtmlMobile("<br><br>")
    ButtonMobile(1, "Click me too !")
    HtmlMobile("<br><br>")
    ButtonMobile(2, "ProgressBar notif")
        HtmlMobile("<br><br>")
    ButtonMobile(3, "Cancel Notif 0")
    CloseMobileContainer()
  EndIf

  Procedure MobileEvents()
    Select EventMobile()
      Case 0
        CreateNotification(0, "Hello world !", "Which name do you want to use ?", 0)
        NotificationButton(0, 1, "OK")
        NotificationButton(0, 2, "Cancel")
        ScheduleNotification(0, #PB_Notification_At, Date()+10)
        
      Case 1
        CreateNotification(1, "2nd notification", "Hello"+Chr(10)+"Friends", 0)
        Debug "Schedule every minute"
        ScheduleNotification(1, #PB_Notification_EveryMinute) ; It's rounded to about 5 mins on Android
        
      Case 2
        CreateNotification(2, "2nd notification", "Copying files...", #PB_Notification_Progress)
        NotificationProgress(2, 50)
        SetNotificationText(2, "Copying 0 / 2...")
        ScheduleNotification(2)
        
      Case 3
        CancelNotification(0)      
    EndSelect
  EndProcedure

  
  Procedure TimerEvents()
    Static i
    Select EventTimer()
      Case 0
        i+1
        If IsNotification(2)
          SetNotificationText(2, "Copying "+i+" / 200...")
          NotificationProgress(2, i)
          If i > 20
            CancelNotification(2)
          EndIf
          
        EndIf
        
    EndSelect
  EndProcedure
  
  Procedure NotificationEvents()
    Select EventNotification()
      Case 0
        If EventType() = #PB_EventType_NotificationTriggered
          Debug "Triggered " + EventNotification()
        Else
          ButtonId = EventData()
          If ButtonId = 1
            Debug "OK pressed !"
          EndIf
          If ButtonId = 2
            Debug "Cancel pressed !"
          EndIf
        EndIf
    EndSelect
  EndProcedure
  
  AddTimer(0, 1000)
  
  BindEvent(#PB_Event_Mobile, @MobileEvents())
  BindEvent(#PB_Event_Timer, @TimerEvents())
  
  BindEvent(#PB_Event_Notification, @NotificationEvents())
About Android creation on Linux, be sure to run the 'install-cordova.sh' script from the spiderbasic home directory to install everything needed. If you think the script can be improved, don't hesitate to tell !

Have fun,

The Fantasie Software Team

Re: SpiderBasic 3.10 beta 1 is ready !

Posted: Mon Jun 02, 2025 9:24 am
by Caronte3D
We must update the Java version?
I get this error trying your native notification example (on Android):

Code: Select all

A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
EDIT:
Ok, with Java 17 compiles.
It's deprecated, but we can download it from:
https://jdk.java.net/archive/

Re: SpiderBasic 3.10 beta 1 is ready !

Posted: Mon Jun 02, 2025 11:43 am
by Peter
Thanks for the new version! 👍

What are the chances that this feature request will also be included in the new version?

Add javascript and CSS scripts in the compilation options.

Re: SpiderBasic 3.10 beta 1 is ready !

Posted: Mon Jun 02, 2025 1:51 pm
by Fred
Caronte3D wrote: Mon Jun 02, 2025 9:24 am We must update the Java version?
I get this error trying your native notification example (on Android):

Code: Select all

A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 17 to run. You are currently using Java 11.
EDIT:
Ok, with Java 17 compiles.
It's deprecated, but we can download it from:
https://jdk.java.net/archive/
When updating cordova, all the toolchain is upgraded and it often requiers a newer Java. So yes, Java 17 is needed now instead of Java 11.

Re: SpiderBasic 3.10 beta 1 is ready !

Posted: Mon Jun 02, 2025 1:52 pm
by Fred
Peter wrote: Mon Jun 02, 2025 11:43 am Thanks for the new version! 👍

What are the chances that this feature request will also be included in the new version?

Add javascript and CSS scripts in the compilation options.
I will try to add it.

Re: SpiderBasic 3.10 beta 1 is ready !

Posted: Tue Jun 03, 2025 8:52 am
by akee
Thanks Fred...

Re: SpiderBasic 3.10 beta 1 is ready !

Posted: Tue Jun 03, 2025 2:59 pm
by falsam
Fred wrote: Mon Jun 02, 2025 1:52 pm
Peter wrote: Mon Jun 02, 2025 11:43 am Thanks for the new version! 👍

What are the chances that this feature request will also be included in the new version?

Add javascript and CSS scripts in the compilation options.
I will try to add it.
Thanks Fred 👍

Re: SpiderBasic 3.10 beta 1 is ready !

Posted: Tue Jun 03, 2025 9:08 pm
by munfraid

Code: Select all

- Added: Android app creation support for Linux and MacOS !
:o finally freed from Windows! This is so great, thanks Fred!

Re: SpiderBasic 3.10 beta 1 is ready !

Posted: Wed Jun 04, 2025 5:37 am
by useful
The help says: "To install SpiderBasic, please read the provided 'INSTALL' file. ", but there is no such file.
p. s. I'm writing about the linux version.

Re: SpiderBasic 3.10 beta 1 is ready !

Posted: Sat Jun 07, 2025 6:38 pm
by Quin
Woot! Thanks Fred! This looks like fun!