Search found 7 matches

by Little John
Tue Jun 02, 2015 6:21 am
Forum: General Discussion
Topic: CreateJSON
Replies: 2
Views: 4147

Re: CreateJSON

In the SB and PB, where the JSON file is created, in which directory?
CreateJSON() does not create a file at all.
For details see the documentation of CreateJSON().

//edit: Peter, 1 minute faster! :)
by Little John
Sat May 23, 2015 5:47 pm
Forum: Coding Questions
Topic: Linebreak in a TextGadget
Replies: 5
Views: 5555

Re: Linebreak in a TextGadget

Uuuh, I didn't know that we have to ( in other words: "can" :-) ) use HTML tags in the text of a SpiderBasic TextGadget.
Many thanks for the info!

But the code that you posted above does not work with PureBasic. So we have to use CompilerIf just in order to use the proper line break.
SpiderBasic ...
by Little John
Sat May 23, 2015 1:22 pm
Forum: Coding Questions
Topic: Linebreak in a TextGadget
Replies: 5
Views: 5555

Linebreak in a TextGadget

Hi,

I tested the following code both with PB 5.31 on Windows, and with SB 1.02 on Windows (with Firefox):

If OpenWindow(0, 0, 0, 270, 160, "TextGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
TextGadget(0, 10, 10, 150, 40, "Line 1 " + #CR$ + "Line 2")
TextGadget(1, 10, 60, 150, 40 ...
by Little John
Sat May 23, 2015 1:06 pm
Forum: Coding Questions
Topic: Is "End" a SpiderBasic keyword?
Replies: 6
Views: 6027

Re: Is "End" a SpiderBasic keyword?

Fred and c4s, thanks for your answers!
I hope I'll soon learn the principle differences between a PB executable and a SB web app. :-)
by Little John
Fri May 22, 2015 4:56 am
Forum: Coding Questions
Topic: Is "End" a SpiderBasic keyword?
Replies: 6
Views: 6027

Re: Is "End" a SpiderBasic keyword?

But what should happen when your web app ends ?
What happens in this code, when OpenWindow() returns 0?

If OpenWindow(0, 100, 200, 320, 200, "Test", #PB_Window_TitleBar)
If CreateImage(0, 320, 200)
; [...]
EndIf
EndIf

Whatever happens, I thought the same could happen in the following code ...
by Little John
Thu May 21, 2015 7:06 pm
Forum: Coding Questions
Topic: Is "End" a SpiderBasic keyword?
Replies: 6
Views: 6027

Re: Is "End" a SpiderBasic keyword?

Yes, I have another use of 'End' in mind.
I'll try to give better examples of what I mean.

This code works fine in PB and SB as well:

If OpenWindow(0, 100, 200, 320, 200, "Test", #PB_Window_TitleBar)
If CreateImage(0, 320, 200)
If StartDrawing(ImageOutput(0))
; [...]
Else
Debug "Can't start ...
by Little John
Wed May 20, 2015 6:37 pm
Forum: Coding Questions
Topic: Is "End" a SpiderBasic keyword?
Replies: 6
Views: 6027

Is "End" a SpiderBasic keyword?

Hi,

in PureBasic, this is a valid program:

Error = 1

If Error <> 0
Debug "Error"
End
EndIf
When I write that code in the SpiderBasic IDE 1.02, it looks fine as well.
Especially, "End" is highlighted as I expected, since I assumed that it is a keyword.
But when trying to run that program ...