Using Settings File

Post Reply
User avatar
Posts: 104
Joined: Thursday 21st February 2019 5:02pm
Location: The Mitten State

Using Settings File

Post by Cedron » Monday 19th August 2019 4:14pm

This is forwarded from: ... 5&start=20

(New topics deserve new threads.)
Lavos wrote:
Monday 19th August 2019 7:35am
So I looked into this: and this seems like it could only handle form Objects... It's probably obvious for you guys where I'm trying to achieve here(Creating a database for the application to access files when needed.) So starting off, I'm trying to figure out how to create a .ini or .conf file to preset options to save for the user. Perfect reference is getprivateProfileString from windows if that makes any sense to you. I've never worked with XML before but it seems like it might be an alternative, any code examples of that would help.

I'm on a windows machine when i posted this, so any request of posting codes, i'd be happy too when i get to my linux machine.

-Regards, Lavos
I'm not sure where you got the impression that Settings could only handle form Objects. It deals in strings. The format of the files are very similar, if not identical, to .ini files in Windows. And the calls to retrieve the values are also similar.

By default, you will find the .conf file in your ~/.config/gambas3 directory.

You can find a usage example from this thread:

Download the copy from the last post.

.... and carry a big stick!

User avatar
Site Admin
Posts: 392
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: Using Settings File

Post by cogier » Monday 19th August 2019 4:40pm

I wrote a simple program to show how to use settings here if it helps.

Post Reply