Search found 709 matches

by Peter
Thu Jan 21, 2021 7:47 am
Forum: Coding Questions
Topic: Is there a equivalent GetGadgetItemText() for EditorGadget?
Replies: 2
Views: 276

Re: Is there a equivalent GetGadgetItemText() for EditorGadg

Procedure.s GetGadgetItemTextEx(Gadget, Position) ProcedureReturn StringField(GetGadgetText(Gadget), Position + 1, #LF$) EndProcedure If OpenWindow(0, 0, 0, 322, 150, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) EditorGadget(0, 8, 8, 306, 133) SetGadgetText(0, "...
by Peter
Sun Jan 17, 2021 9:58 pm
Forum: Coding Questions
Topic: [Solved] Sound Stop Callback
Replies: 2
Views: 218

Re: Sound Stop Callback

Procedure PlaySound2(a, c = 0, b = 100, Callback = #Null) ! var a = v_a; ! var b = v_b; ! var c = v_c; ! // original SB-Code (spider_PlaySound()) with callback-call: ! "undefined" === typeof c && (c = 0); ! "undefined" === typeof b && (b = 100); ! var d, e; ! if ...
by Peter
Sun Jan 17, 2021 9:19 pm
Forum: Coding Questions
Topic: How to write and retrieve data over web for a newbie?
Replies: 2
Views: 300

Re: How to write and retrieve data over web for a newbie?

Write Data: I suspect that you are getting a CORS error. Open the developer console of your browser (usually with <F12>). If you see this error message: Access to XMLHttpRequest at [...] from origin [...] has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the req...
by Peter
Sat Jan 16, 2021 4:09 pm
Forum: Feature Requests and Wishlists
Topic: Attach a timestamp to the generated JavaScript
Replies: 3
Views: 1221

Re: Attach a timestamp to the generated JavaScript-Filename

After three years, I stumbled upon this problem again.
by Peter
Mon Jan 11, 2021 9:08 pm
Forum: Coding Questions
Topic: How to load XML file with pressing on a button
Replies: 2
Views: 312

Re: How to load XML file with pressing on a button

you can use

Code: Select all

HTTPRequest(#PB_HTTP_Get, "http://localhost/somephpfile.php?name=something", "", @YourCallback())
In YourCallback() you can parse the result with ParseXML().

Greetings ... Peter
by Peter
Mon Jan 04, 2021 6:24 pm
Forum: Feature Requests and Wishlists
Topic: OpenWindow(): Useless #PB_Window_TitleBar - Flag
Replies: 0
Views: 560

OpenWindow(): Useless #PB_Window_TitleBar - Flag

SB-Help wrote:#PB_Window_TitleBar : Creates a window with a titlebar.
SB-Windows always have a title bar.
by Peter
Sun Jan 03, 2021 5:53 pm
Forum: Bugs Reports
Topic: First PanelGadget-Tab loses left border
Replies: 1
Views: 331

Re: First PanelGadget-Tab loses left border

found a workaround:

Code: Select all

Procedure ButtonEvent()
  SetGadgetItemText(#PanelGadget, 0, "!")
  ResizeGadget(#PanelGadget, #PB_Ignore, #PB_Ignore, #PB_Ignore, #PB_Ignore)
EndProcedure
by Peter
Sun Jan 03, 2021 5:00 pm
Forum: Bugs Reports
Topic: First PanelGadget-Tab loses left border
Replies: 1
Views: 331

First PanelGadget-Tab loses left border

Hello, if you change the text of the first tab of a PanelGadget, it loses the left border. Before: https://i.imgur.com/HcRWAag.png After: https://i.imgur.com/SP8GLWY.png Enumeration #Window #PanelGadget #ButtonGadget EndEnumeration OpenWindow(#Window, 0, 0, 322, 220, "PanelGadget", #PB_Win...
by Peter
Thu Dec 31, 2020 1:31 pm
Forum: Coding Questions
Topic: Http Requests with PB server
Replies: 5
Views: 463

Re: Http Requests with PB server

untested, but try:

Code: Select all

  template.s = ~"HTTP/1.1 " + status +
               ~"\r\nAccess-Control-Allow-Origin: *" + ; Private APIs should not allow all origins, but only its domain.
               ~"\r\nAccess-Control-Allow-Methods: *" + ; <- this
[...]
by Peter
Thu Dec 31, 2020 10:37 am
Forum: Coding Questions
Topic: Http Requests with PB server
Replies: 5
Views: 463

Re: Http Requests with PB server

Please open the developer console of your browser (usually with <F12>).
There you will find a more detailed error message.