Why doesn't this work anymore?

Thank you! That was very helpful.

I learn best from an example and then playing with it to try to understand the parts of the code.

I am not comfortable with xojo debugging yet, and I see now that this was easy to find.

By the way, is there an easy way to see what an IOException 2 is? I found it, but I was expecting to click somewhere to see what it was.

1 Like

Some of these may be platform dependent, but see here:

https://documentation.xojo.com/api/exceptions/ioexception.html#ioexception

You need to check if the file already exist or not that’s one of the steps to take.

Var stream as textoutputstream
If not preffike.exists then
//textoutputstream.create(preffike)
Else
// textoutputstream.open(preffile)
End If

Pseudo code.

Usually, https://osstatus.com helps for Mac OS error codes.
In the case of the number 2, there are many sub-components that define it (since it’s a small number), so the list returned is large, but by scrolling, you find the most applicable reason:
Kernel errno.h ENOENT 2 No such file or directory

2 Likes