Search found 196 matches

by cogier
Sunday 09th December 2018 12:37pm
Forum: General
Topic: How to open an old project from 2006 with Gambas 3.11.4?
Replies: 3
Views: 18

Re: How to open an old project from 2006 with Gambas 3.11.4?

I have messed about with the code from here https://sourceforge.net/p/gambas/mailman/attachment/1137704407.9668.2.camel%40linex-QL6ZhO/1/ The issues I found: - There were lots of Var as Byte[] which need to be Var as New Byte[] This line I changed from RETURN m_ptab[(CLng(m_ltab[x]) + CLng(m_ltab[y]...
by cogier
Saturday 08th December 2018 12:40pm
Forum: General
Topic: Json formating output
Replies: 2
Views: 35

Re: Json formating output

Can you upload the JSON file please.
by cogier
Wednesday 05th December 2018 3:55pm
Forum: General
Topic: how to index a collection
Replies: 2
Views: 47

Re: how to index a collection

Hi greyghost4 and welcome to the forum, I cannot work out what you mean by needing to 'index' the data. I presume listofdata is a Collection . I have attached a sample program that opens and displays a JSON file which may help. If not please can you post a copy of your JSON file and a little more de...
by cogier
Sunday 25th November 2018 5:04pm
Forum: Component
Topic: Gambas --> Beaglebone Black
Replies: 7
Views: 499

Re: Gambas --> Beaglebone Black

I had forgotten about the attached Gambas program I wrote in 2016. It can control the Pi pins. It only requires that 'gpio' is installed on the Pi which I understand is a default installation. There is a module you can add to your program that will give you control. There are some pictures of the pr...
by cogier
Saturday 24th November 2018 4:44pm
Forum: Web
Topic: How to connect to web database
Replies: 3
Views: 77

Re: How to connect to web database

Hi Bill,

I have not mastered DB but there is an example in the Gambas Farm called 'DataBaseExample' that might help.
by cogier
Tuesday 30th October 2018 4:12pm
Forum: General
Topic: gridview header height
Replies: 3
Views: 183

Re: gridview header height

The only way I can find to set the header height is to set the font size. http://cogier.com/gambas/Gridview%20header%20height.jpg Try the following code: - Public Sub Form_Open() Dim GridView1 As GridView Dim sText As String[] = ["Hello", "world!", "Charlie", "was", "here!"] Dim siCount, siLoop As S...
by cogier
Monday 01st October 2018 3:46pm
Forum: General
Topic: No Spaces on JSON.Decode
Replies: 5
Views: 225

Re: No Spaces on JSON.Decode

Hi Wackout and welcome to the forum.

Have a look at the attached code.
Image
by cogier
Thursday 27th September 2018 1:29pm
Forum: General
Topic: "Jump is too far" error in a complex Select-Case
Replies: 6
Views: 266

Re: "Jump is too far" error in a complex Select-Case

I have written a piece of code, attached, with 1000 'Case' options (I got Gambas to write most of it!) and it does not crash. So I don't think that any 'limit' has been exceeded. Will you not let us see your code?
test.tar.gz
(397.58 KiB) Downloaded 17 times
by cogier
Wednesday 26th September 2018 3:51pm
Forum: General
Topic: "Jump is too far" error in a complex Select-Case
Replies: 6
Views: 266

Re: "Jump is too far" error in a complex Select-Case

Hi Godzilla and welcome to the forum. You have found an interesting problem. Can you let us see the code or put something together so we can see the effect.

One thing you could try is changing the Component gb.gui to gb.gui.qt and see if that makes any difference.
by cogier
Tuesday 25th September 2018 2:42pm
Forum: General
Topic: Did you know?
Replies: 29
Views: 3572

Re: Did you know?

Here's one I didn't know:- Dim siRand1, siRand2, siRand3, siRand4 As Short = Rand(0, 9) This generates random numbers for each variable. Try this: - Public Sub Form_Open() Dim siCount As Short For siCount = 1 To 10 Print Generate() Next End Public Sub Generate() As String Dim siRand1, siRand2, siRan...