Save a simple INI-file

Hmmm, i wrote the Software with Xojo/Linux. Under Win7 it doesnt work. The Path is not found. And it looks absolutely terrible.

It’s been just 3 hours since you first post here and mentioned you were a “Xojo-starter”. That has a lot more to do with what you have at this point rather than deficiencies in Xojo. I programmed for 15 years in VB, you can pretty much get it to looking and working like you want, just takes a little time to get used to new things.

I started posting after one day of hard work. The actual solution saves the ini file in a special folder. That is dangerous because i have different versions for different customers/projects and i need a simple txt file direct in the working directory (?).
I think this problem is to easy to explain.

The deficites in Xojo, the slow speed of the GUI and a lot of fatal bugs (type single = integer !!!) makes it not easy to work with that. If it looks in Linux perfect but in Windows absolutely ugly, we are forced to switch back to VB6.0/ .NET :frowning:
But we want to work with Xojo!

No, you don’t.
If you try to do that your program will fail on Windows 7 upwards.
And a VB6 program that does the same would fail in the same way.
Things have changed since VB

Why do you worry about how a variable type is implemented internally?
If it holds a floating point number and returns a floating point number, it could be implemented as a lego brick internally.
And in what way is this fatal? Are you trying to copy data around using pointers?

Give him a hammer and saw, and he wants to use a brick and sharp wire… just no pleasing some people

I think you are working on a Mac? Than Xojo works fine.
But on Linux Xojo works very slow and buggy…

Dim A as Single
A = 1.1
Label1.text = cstr(A)

The result is 1, not 1.1 because i have to use double instead of single. Than the result is 1.1 !!!
B = A * 10 then B=10 not eleven.
The bug is not the conversion from single to string.
The bug is the type single (= integer).
This is one of x heavy Xojo-Linux bugs…

Where is your actual code?
What version of RB Linux?

It may be a new bug.
I only have RB 2008 on Linux, but this code in the open event of a window produces “11”, and the edit field shows 1.1

Dim a as single dim b as single a= 1.1 editfield1.text = cstr(a) b = a*10 msgbox cstr(b)

I’m dredging this up to ask a somewhat related question. ( I did get a file to work and I appreciate all of the comments).

I just generally want to be able to create a file from within an app without having to use a save as dialog. I have made several trivial apps in VB6 and C over the years, and I often want to save things in a log file or for use by another app.

I cannot find a way to do that other than the specialfolder method – which seems to be restricted to the identified locations. I have done a fair amount of searching, but couldn’t find anything.

Thanks and sorry if I missed an obvious solution.


You have to know the path of your file, so you can get a starting FolderItem, then use “Child” to drill down. For example:

dim f as FolderItem = SpecialFolder.ApplicationData
f = f.Child( "" )
if not f.Exists then
end if

f = f.Child( "some file.txt" )
dim bs as BinaryStream = BinaryStream.Create( f ) // Create the file

I think I can figure it out. It seems a bit convoluted, but i imagine that there’s a reason