permissions - RealBasic app crashes on writeline -


i have mac rb app crashes when write line textoutputstream on user's preferences. write operation works great when user admin, other user crashes. made me think it's permission issue, tried changing permission, without luck.

the error is: "an exception of class nilobjectexception not handled. operation must shut down"

any amazing people appreciated. thanks!

here's code:

dim tablestring string dim filestream textoutputstream dim file folderitem  file = specialfolder.sharedpreferences.child("filename.txt")   tablestring = translationtabletostring  filestream=file.createtextfile  // didn't help: //file.permissions= &o777  // line breaks: filestream.writeline tablestring 

you don't mention version of rb using, reasonably current version, syntax should using is:

filestream = textoutputstream.create(file) 

which should wrap in try/catch this:

try   filestream = textoutputstream.create(file)   filestream.writeline(tablestring) catch e ioexception   msgbox("error code: " + str(e.errornumber)) end try 

e.errornumber contain os-specific error code pinpoint problem.

http://docs.realsoftware.com/index.php/ioexception


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -