IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Vous êtes nouveau sur Developpez.com ? Créez votre compte ou connectez-vous afin de pouvoir participer !

Vous devez avoir un compte Developpez.com et être connecté pour pouvoir participer aux discussions.

Vous n'avez pas encore de compte Developpez.com ? Créez-en un en quelques instants, c'est entièrement gratuit !

Si vous disposez déjà d'un compte et qu'il est bien activé, connectez-vous à l'aide du formulaire ci-dessous.

Identifiez-vous
Identifiant
Mot de passe
Mot de passe oublié ?
Créer un compte

L'inscription est gratuite et ne vous prendra que quelques instants !

Je m'inscris !

SpiderBasic 3.10 beta 1 est disponible sur votre compte

Le , par comtois

0PARTAGES

3  0 
Hi there,

A new version of SpiderBasic is ready to test with some cool new features is available on your account !

  • 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 : Sélectionner tout
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
; 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
Source de l'information
Vous avez lu gratuitement 157 articles depuis plus d'un an.
Soutenez le club developpez.com en souscrivant un abonnement pour que nous puissions continuer à vous proposer des publications.

Une erreur dans cette actualité ? Signalez-nous-la !