Re: SpiderBasic 3.30 beta 1 is out !
Posted: Wed May 27, 2026 7:43 am
It's a regression, will be fixed in beta 2. Thanks !
- a basic to master the web -
https://forums.spiderbasic.com/
Great news, thank you!Fred wrote: Wed May 27, 2026 10:22 am - 2026-05-27: beta 2 is out, with some bug fixes, and a new DateUTC() function.
Thank you very much for beta2 - that was fast!
Code: Select all
Procedure ButtonEvent()
Filename$ = OpenFileRequester("", #PB_Requester_MultiSelection)
; Process all the selected filename
;
While Filename$
Debug "Filename: " + Filename$
Filename$ = NextSelectedFilename()
Wend
EndProcedure
OpenWindow(0, 100, 100, 200, 55, "File")
ButtonGadget(0, 10, 10, 170, 25, "Open local file...")
BindGadgetEvent(0, @ButtonEvent())Code: Select all
Procedure ButtonEvent()
Filename$ = OpenFileRequester("")
If Filename$
Image = LoadImage(#PB_Any, Filename$, #PB_LocalFile)
If Image
; Display the image in a new window
OpenWindow(#PB_Any, 10, 10, 300, 300, "Image", #PB_Window_SizeGadget)
ImageGadget(#PB_Any, 0, 0, ImageWidth(Image), ImageHeight(Image), ImageID(Image))
EndIf
EndIf
EndProcedure
OpenWindow(0, 100, 100, 200, 55, "File")
ButtonGadget(0, 10, 10, 170, 25, "Open local file...")
BindGadgetEvent(0, @ButtonEvent())
Code: Select all
OpenFileRequester(Pattern$, Callback)Code: Select all
OpenFileRequester(Pattern$, #PB_Requester_MultiSelection)Code: Select all
PictureButton = TextGadget(#PB_Any,20,650,100,100, "'<button type='button'onclick='f_klik()'><img src='512x512.png' alt='Button Image' style='width: 100px; height: 100px;'></button>")Code: Select all
Picture = TextGadget(#PB_Any,20,650,100,100, "<img src='512x512.png' width='100' height='100'>") On Ubuntu 22.04 spiderbasic 3.20 complile took 40 seconds. I use my phone to test so I can't mesure that. Installing the APK doesn't take long neither.Fred wrote: Wed Jun 17, 2026 7:32 am I'm just wondering, what's your Android (or IOS) app build time (from compile to full deploy on device) ? I got a very old PC and want to see what's the improvement with new.
Here (timed the second build, as the first one does some cache, launch gradle and adb etc):
- with 3.20: 3m20
- with 3.30: 1m15
Did you try the latest SB 3.30 beta? The image loading functions have been changed,RBart wrote: Fri Jun 19, 2026 12:15 pm But, I find it very difficult to work with images in Spiderbasic.
It's a lot of code to get just one image on the screen.
Code: Select all
Procedure klik()
Debug "klik!"
EndProcedure
OpenWindow(1, 10, 10, 532, 532, "Window 1")
If Not LoadImage(1,"512x512.png")
CreateImage(1,512,512,24)
EndIf
ButtonImageGadget(1,10,10,512,512,ImageID(1))
BindGadgetEvent(1,@klik(),#PB_EventType_LeftClick)
Procedure names inside modules are different, it is not ‚f_klik()‘.RBart wrote: Fri Jun 19, 2026 12:15 pm But when I call the procedure klik() it doesn't work, inside a module.