Getting a config file to work

Hi, I’m a beginner at Xojo and at programming in general and am using a sample code I found to make a config file for my project. I dropped this into my project ( https://www.dropbox.com/s/h4v3hmiexrqg4v9/v2%20test.xojo_binary_project - this is code that I inherited) but cannot get the config file to work. Any idea what I’m doing wrong?

Thanks,

Sam

A few MAJOR things…

  1. you have a method called CONFIG_LOAD… but you never call it, nor are you ever calling CONFIG_SAVE

  2. the contents of CONFIG_LOAD were copied directly from the sample program and do not reflect what ever config information YOUR program requires

  3. you config file is being written to the DESKTOP …

Any code I provided in conjunction with the class itself was strictly to demonstrate proper syntax… not to be what your app required
It is up to you to decide how best the class fits you application, and to alter the LOAD and SAVE routines appropriately, as well as deciding the appropriate location in you app to call them.

Thanks, Dave. So, it appears that I need to start over from scratch. How do I know what “config information” my program requires? I know what I want to do - to be able to make changes to the GUI and save them, if that makes sense (for instance, changing the color of the squares and then saving those changes) - but how do I incorporate that into my program? Where do I begin? I’ve read the Xojo tutorial but it mentions nothing about config files, so I’m quite lost about how to do this.

“How do I know what config information my program requires?”
Well that is a question only you can answer…

You mentioned colors… then the variables that contain those colors would be good candidates for storing in a config file.

And the XOJO documentation provides information on how the languages works, not solutions to specific programs