Data folder was what I had in mind originally; will be fixed for 1.1.
How would I put the files into the Runtime's package and still get them to load properly?
Since you're thinking of doing this on other platforms as well:
Dim F As FolderItem
#If TargetMacOS
// Folder "Resources" in Application bundle
F = App.ExecutableFile.Parent.Parent.Child("Resources").Child("Resources")
#Else
// load code from data folder.
F = GetFolderItem("Data")
#EndIf
So I can save all the files into a temporary session folder and then when the user wishes to compile, just do...
F1 = (data folder syntax)
F2 = App.ExecutableFile.Parent.Child("Resources")
F1.copyfolderto(F2)
So I can save all the files into a temporary session folder and then when the user wishes to compile, just do...
F1 = (data folder syntax)
F2 = App.ExecutableFile.Parent.Child("Resources")
F1.copyfolderto(F2)
No.
App.ExecutableFile.Parent.Parent.Child("Resources").Child("Data").CreateAsFolder
Dim F1 As FolderItem = GetFolderItem("Data")
Dim F2 As FolderItem = App.ExecutableFile.Parent.Parent.Child("Resources").Child("Data")
For i As Integer = 1 To F1.Count
F1.Item( i ).CopyFileTo F2.Child( F1.Item( i ).Name )
Next
Or something along those lines.
Then just load the stuff from the Data folder within the App's Resources one.
I'm trying the code, but I can't get it to work with TextInputStream :\\
Here's what I've done;
Dim F As FolderItem
Dim t As TextInputStream
dim loader as string
dim largeloader as Variant
'f=GetFolderItem(CardNumber.StringValue + ".cfg")
F = (app.ExecutableFile.Parent.Parent.Child("Resources").Child("Resources").Child(CardNumber.StringValue + ".cfg"))
if F.exists = true then
t=f.OpenAsTextFile
Normally, if we do F = GetFolderItem(CardNumber.StringValue + ".cfg"), and it doesn't exist, it just goes to the else part of the first IF block and displays a message and politely quits. If I use this, RB gets stuck on if "F.exists = true then" and returns NilObjectExpectation.
Also, if I try "F = GetFolderItem(Application....)" then it says that the parameters are not compatible with the GetFolderItem function.