Hmmmm, must be something odd going on with your windows setup or AppGameKit installation, as I have no problems writing and reading files from windows builds of my current project (using v1036 of AGK).
As the filepaths do not match (programFiles vs programmingFiles), try saving the example project somewhere else. Just copy the entire folder, save it where you keep your own projects, and open from there. Then try again.
As it happens just a couple of hours ago, I implemented writing to and reading back data on a project I am working on. First time trying, and great success.
It's my first project using AppGameKit, and it is not a game but rather a small utility to help out with calculating various attributes relating to modular LED screens, and if using PC/Mac/iPad, also test the panels and screen by means of various test-patterns and panel identifiers.
My AppGameKit project folder is on a seperate partition (as I always keep OS/program installations and data files on different disks, a good practice for anyone who loves their data files
)
File read/write from AppGameKit is pretty painless as far as I've experienced. The following snippet is how I have in my project saved out an array to a file, and reading it back. With a file-exist check for the first time running of the app that also initialize the array with empty (default) data.
loadDefinitions:
if GetFileExists("paneldefinitions.txt") = 1
OpenToRead(1, "paneldefinitions.txt")
// read data here
for m = 1 to 10
panel[m].model$ = readString(1)
panel[m].pixels_X = readInteger(1)
panel[m].pixels_Y = readInteger(1)
panel[m].cm_X = readInteger(1)
panel[m].cm_Y = readInteger(1)
panel[m].watts = readInteger(1)
panel[m].kg = readInteger(1)
next m
CloseFile(1)
definitionFileExist = 1
else
definitionFileExist = 0
// set initial values to panel
for m = 1 to 10
panel[m].model$ = "empty-" + str(m)
panel[m].pixels_X = 0
panel[m].pixels_Y = 0
panel[m].cm_X = 0
panel[m].cm_Y = 0
panel[m].watts = 0
panel[m].kg = 0
next m
endif
return
saveDefinitions:
OpenToWrite (1, "paneldefinitions.txt", 0)
// write data here
for m = 1 to 10
writeString(1, panel[m].model$)
writeInteger(1, panel[m].pixels_X)
writeInteger(1, panel[m].pixels_Y)
writeInteger(1, panel[m].cm_X)
writeInteger(1, panel[m].cm_Y)
writeInteger(1, panel[m].watts)
writeInteger(1, panel[m].kg)
next m
CloseFile(1)
definitionFileExist = 1
Return