Search found 709 matches

by Peter
Sun Jan 31, 2021 7:10 pm
Forum: Coding Questions
Topic: LoadFont Current Name?
Replies: 7
Views: 510

Re: LoadFont Current Name?

something like this? OpenWindow(0, 0, 0, 222, 130, "SetGadgetFont", #PB_Window_ScreenCentered) ButtonGadget(0, 10, 10, 200, 30, "default font") Define GID Define FontName.s Define FontHeight GID = GadgetID(0) ! v_fontname = $(v_gid.div).css("fontFamily"); ! v_fontheight...
by Peter
Sun Jan 31, 2021 5:18 pm
Forum: Coding Questions
Topic: LoadFont Current Name?
Replies: 7
Views: 510

Re: LoadFont Current Name?

Maybe I'm still misunderstanding you, but if you want to change a font(-style), you must have the font number. And if you have it, then you can call AdjustFont().
by Peter
Sun Jan 31, 2021 3:02 pm
Forum: Coding Questions
Topic: LoadFont Current Name?
Replies: 7
Views: 510

Re: LoadFont Current Name?

EnableExplicit Procedure AdjustFont(Font, Height, Flags) If IsFont(Font) = 0 : ProcedureReturn : EndIf ! var font = spider.font.objects.Get(v_font); ! var fontFamily = font.family; ! spider_FreeFont(v_font); ! spider_LoadFont(v_font, fontFamily, v_height, v_flags); EndProcedure OpenWindow(0, 0, 0, ...
by Peter
Thu Jan 28, 2021 4:38 pm
Forum: Coding Questions
Topic: delete cache
Replies: 9
Views: 562

Re: delete cache

then try the following::

Code: Select all

LoadImage(#YourImage, "[SomePath]/YourImage.png?rnd=" + ElapsedMilliseconds())
by Peter
Thu Jan 28, 2021 12:36 pm
Forum: Coding Questions
Topic: Really new user
Replies: 2
Views: 303

Re: Really new user

Hello aldewacs, WHAT is a good book(s) to learn how programs like my Spider App get onto, and "live" on a webserver. As far as I know, there is no book to learn about SpiderBasic (yet). I need to run Windows on there... what is involved? nothing special. Just download and install SB. Run i...
by Peter
Wed Jan 27, 2021 8:53 pm
Forum: Coding Questions
Topic: delete cache
Replies: 9
Views: 562

Re: delete cache

Is there a particular reason for this need? You can try to use my HtmlPreprocessor to inject the following lines into the head-section of the SpiderBasic index.html - File <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-control" content=&...
by Peter
Wed Jan 27, 2021 3:30 pm
Forum: Coding Questions
Topic: delete cache
Replies: 9
Views: 562

Re: delete cache

Stefan wrote:Where does the code go? No matter where I insert it, I get an endless loop and the page reloads again and again.
Put it into a procedure and call it, when a button is clicked (for example)
by Peter
Wed Jan 27, 2021 11:20 am
Forum: Coding Questions
Topic: delete cache
Replies: 9
Views: 562

Re: delete cache

Can I use Spiderbasic to delete the cache of the browser and the cache of the images in the browser? untested: You can call window.location.reload(true) to reload the current page. It will ignore any cached items and retrieve new copies of the page, css, images, JavaScript, etc from the server. Thi...
by Peter
Tue Jan 26, 2021 12:32 pm
Forum: Coding Questions
Topic: SpiderBytes question
Replies: 2
Views: 289

Re: SpiderBytes question

// Edit: I misunderstood this at first. Here is my revised answer: I just read up on it and it seems to me that currently it cannot be used for database access as structured lists cannot be passed... Yes, you are right: you can only pass simple data types like numbers or strings. However, you can co...