Search found 200 matches

by cogier
Wednesday 12th December 2018 11:12am
Forum: General
Topic: Json formating output
Replies: 10
Views: 102

Re: Json formating output

Your code works but you can use .Max instead of .Count -1 and you don't need so many brackets in the 'Save' line. For iCount = 0 To sFile.Max sLoad2 &= sFile[iCount] & gb.NewLine Next File.save("~/testfile2.txt", sLoad2) However Gambas can do this in one line with 'Join', no need for the loop above....
by cogier
Tuesday 11th December 2018 1:38pm
Forum: General
Topic: Json formating output
Replies: 10
Views: 102

Re: Json formating output

Let's try and breakdown the line Dim sFile As String[] = Split(File.Load("~/airplane files/testfile.txt"), gb.NewLine) for you by separating out the individual commands. The attached program does the same as the single line. I have added a Variable along with a Print and Stop command. Public Sub For...
by cogier
Monday 10th December 2018 6:26pm
Forum: General
Topic: Json formating output
Replies: 10
Views: 102

Re: Json formating output

Try changing the line in my program from: -
Dim sFile As String[] = Split(File.Load("../json.txt"), gb.NewLine)
To: -
Dim sFile As String[] = Split(File.Load("~/airplane files/testfile.txt"), gb.NewLine)
by cogier
Monday 10th December 2018 4:13pm
Forum: General
Topic: Json formating output
Replies: 10
Views: 102

Re: Json formating output

Have a look at the attached program. Hopefully this will help.

Image
Test2-0.0.1.tar.gz
(32.89 KiB) Downloaded 6 times
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: 37

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: 10
Views: 102

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: 57

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: 513

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: 86

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: 196

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...