Found an issue in SpiderBasic ? Please report it here !
morosh
 
Posts: 14
Joined: Mon Feb 02, 2015 7:48 pm

[Done] string gadget doesn't open onscreen keyboard

by morosh Wed Jul 19, 2017 2:56 pm

Hello:
I'm testing a very simple program which includes a string gadget, at run on my smartphone, I don't have the onscreen keyboard to enter values.

any trick?

Code: Select all
Declare check()

LoadFont(0, "verdana", 20)

OpenWindow(0,0,0,300,200,"test")
TextGadget(10,20,10,250,30,"Test your skill in addition")
TextGadget(0,20,40,50,30,"", #PB_Text_Border | #PB_Text_Center| #PB_Text_VerticalCenter)
TextGadget(1,150,40,50,30,"", #PB_Text_Border | #PB_Text_Center | #PB_Text_VerticalCenter)
StringGadget(2,80,80,50,30,"",#PB_String_Numeric)
ButtonGadget(3,85,120,100,30,"CHECK")
TextGadget(4,85,160,100,30,"", #PB_Text_Border | #PB_Text_Center | #PB_Text_VerticalCenter)
SetGadgetColor(0, #PB_Gadget_BackColor, $33FFFF)
SetGadgetColor(1, #PB_Gadget_BackColor, $33FFFF)
SetGadgetColor(2, #PB_Gadget_BackColor, $33FFFF)
SetGadgetColor(3, #PB_Gadget_BackColor, $3300)
SetGadgetFont(10, FontID(0))
SetGadgetFont(0, FontID(0))
SetGadgetFont(1, FontID(0))
SetGadgetFont(2, FontID(0))
SetGadgetFont(3, FontID(0))
SetGadgetFont(4, FontID(0))
SetGadgetText(0,Str(Random(10,1)))
SetGadgetText(1,Str(Random(10,1)))


BindGadgetEvent(3, @check() , PB_EventType_LeftClick)
CloseDebugOutput()

Procedure check()
  If GetGadgetText(3)="CHECK"
    If Val(GetGadgetText(2))=Val(GetGadgetText(0))+Val(GetGadgetText(1))
      SetGadgetText(4,"CORRECT")
      SetGadgetText(3,"NEW")
    Else
      SetGadgetText(4,"FALSE")
;      SetGadgetText(3,"CHECK")
    EndIf
  ElseIf GetGadgetText(3)="NEW"
    SetGadgetText(0,Str(Random(10,1)))
    SetGadgetText(1,Str(Random(10,1)))
    SetGadgetText(3,"CHECK")
    SetGadgetText(2,"")
  EndIf
EndProcedure


; IDE Options = SpiderBasic 2.10 (Windows - x86)
; CursorPosition = 27
; FirstLine = 9
; Folding = -
; WebAppName = test add
; HtmlFilename = test_add.html
; JavaScriptFilename = test_add.js
; OptimizeJS
; iOSAppOrientation = 0
; AndroidAppName = test_add
; AndroidAppIcon = pyramide64.png
; AndroidAppVersion = 2.1.0
; AndroidAppPackageID = com.spiderbasic.test_add
; AndroidAppOutput = C:\Users\Morosh\Desktop\test_add.apk
; AndroidAppOrientation = 0
; AndroidAppEnableDebugger
; EnableXP
; DisableDebugger
; CompileSourceDirectory
; EnableUnicode
User avatar
MrTAToad
 
Posts: 291
Joined: Sun Apr 20, 2014 11:43 am
Location: Chichester, England

Re: string gadget doesn't open onscreen keyboard

by MrTAToad Wed Jul 19, 2017 5:38 pm

I wonder if the check routine needs to be in an event loop for the keyboard to appear... Its possible the OSK is created only after event polling
morosh
 
Posts: 14
Joined: Mon Feb 02, 2015 7:48 pm

Re: string gadget doesn't open onscreen keyboard

by morosh Thu Jul 20, 2017 5:23 am

I tried with an example found in help, the OSK appears randomly, curious no?

Code: Select all
  If OpenWindow(0, 0, 0, 322, 205, "StringGadget Flags", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    StringGadget(0, 8,  10, 306, 20, "Normal StringGadget...")
    StringGadget(1, 8,  35, 306, 20, "1234567", #PB_String_Numeric)
    StringGadget(2, 8,  60, 306, 20, "Read-only StringGadget", #PB_String_ReadOnly)
    StringGadget(3, 8,  85, 306, 20, "lowercase...", #PB_String_LowerCase)
    StringGadget(4, 8, 110, 306, 20, "uppercase...", #PB_String_UpperCase)
    StringGadget(5, 8, 140, 306, 20, "Borderless StringGadget", #PB_String_BorderLess)
    StringGadget(6, 8, 170, 306, 20, "Password", #PB_String_Password)
  EndIf
  CloseDebugOutput()
 

; IDE Options = SpiderBasic 2.10 (Windows - x86)
; CursorPosition = 11
; iOSAppOrientation = 0
; AndroidAppName = test
; AndroidAppVersion = 1.0.0
; AndroidAppPackageID = com.spiderbasic.test
; AndroidAppOutput = E:\my_data\prog\spiderbasic\test.apk
; AndroidAppOrientation = 0
; AndroidAppEnableDebugger
; EnableXP
; CompileSourceDirectory
User avatar
MrTAToad
 
Posts: 291
Joined: Sun Apr 20, 2014 11:43 am
Location: Chichester, England

Re: string gadget doesn't open onscreen keyboard

by MrTAToad Fri Jul 21, 2017 12:29 pm

It is - it's why I think a polling is needed. It's possible the OSK event in the system is being read at the wrong time or the wrong edit box is receiving the incorrect event code to create the OSK
morosh
 
Posts: 14
Joined: Mon Feb 02, 2015 7:48 pm

Re: string gadget doesn't open onscreen keyboard

by morosh Sat Jul 22, 2017 7:48 am

I retried my first example with version 2.0, the OSK works fine. It seems that the problem comes from v2.1.
This way, the string gadget this way is unusable, I think this is a bug.
User avatar
MrTAToad
 
Posts: 291
Joined: Sun Apr 20, 2014 11:43 am
Location: Chichester, England

Re: string gadget doesn't open onscreen keyboard

by MrTAToad Sat Jul 22, 2017 4:34 pm

Better make a post in the Bug section...
User avatar
DanLJr
 
Posts: 51
Joined: Wed Jul 04, 2018 4:24 am
Location: USA

Re: string gadget doesn't open onscreen keyboard

by DanLJr Wed Dec 12, 2018 8:46 pm

MrTAToad wrote:Better make a post in the Bug section...


Yeah, there are several threads surrounding this topic:

viewtopic.php?f=13&t=1555

viewtopic.php?f=6&t=1339

viewtopic.php?f=6&t=1597

I'm sure there are others. Let's see if we can get some action on this topic in the Bugs section! (FYI: I just PM'd Fred about this one today as well. Hope we hear something soon!)

-Dan
Fred
Site Admin
 
Posts: 1134
Joined: Mon Feb 24, 2014 10:51 am

Re: string gadget doesn't open onscreen keyboard

by Fred Tue Jan 15, 2019 9:47 am

Moved to bug report
Fred
Site Admin
 
Posts: 1134
Joined: Mon Feb 24, 2014 10:51 am

Re: string gadget doesn't open onscreen keyboard

by Fred Sun Jan 27, 2019 1:38 pm

Fixed.
Return to Bugs Reports

Who is online

Users browsing this forum: No registered users and 1 guest