I have a snippet of code that writes a simple text file and saves it, it works fine on Windows but saves nothing on Mac (mountain Lion 10.8 on VirtualBox)
I have a feeling its because its because I used ShellPath to get the save path so its “/” opposed to “:” however a little bit further on I use sh excute and the program launches fine with slashes.
I do get a warning “accept/reject” warning as the program runs but it goes away before I have chance to read it, could this be the reason why?
I know nothing about Mac, I haven’t bought a license to build on Mac yet so I can’t see if that would make any difference.
I have checked the path and it appears to be right from f
[code] dim Line1 as String
dim Line2 As String
dim Line3 as String
Line1=( EndOfLine)
Line2=(“message ““Merge '” +Singlescene.ScenePathtxt.Text + “’” + “0 0 1 1 1 0 0” + “”””+ EndOfLine)
Line3=(“message ‘Save " +Main.Savetxt.Text + “/” + "temp.xml’” + EndOfLine)
Dim t as TextOutputStream
Dim f as FolderItem
f=GetFolderItem(Main.Savetxt.Text +"/temp.ipt.thea")
if f <> Nil then
t = TextOutputStream.Create(f)
Dim s as String
s=ReplaceLineEndings(Line1 +Line2 +Line3,EndOfLine.Macintosh)
t.Write (s)
t.Close
End if[/code]
the output would be (this is Windows)
[code]
message “Merge 'C:\Users
ige\Documents\piano.pack.thea’0 0 1 1 1 0 0”
message ‘Save C:\Users
ige\Desktop\atest\temp.xml’[/code]
thanks
Nige