How to do,Sir. I 've never done before. It's my firsttime."java.lang.RuntimeException: SetDataFolder must be called before using this method."
View attachment 145800
And that prevents you from just trying things out?I 've never done before. It's my firsttime.
xui.SetDataFolder("YourAppName")
Post it in Sub initialize in bas file, YourAppName is B4XThaiUtils.bas) ,orAnd that prevents you from just trying things out?
View attachment 145803
Everything is explained.
B4X:xui.SetDataFolder("YourAppName")
I create the Defaultfolder at Roaming,then I have directory path c:\users\salea\Appdata\Roaming\DefaultFolder"java.lang.RuntimeException: SetDataFolder must be called before using this method."
View attachment 145800
#If B4J
xui.setdatafolder("c:\users\salea\Appdata\Roaming\DefaultFolder ")
#End If
No! Then you won't learn it either. I even gave you a code snippet, you just had to change "YourAppName" with a name of your choice.Could you make the complete the project for me studying?
I create project name is "TestThaiUtils" as B4XPagesNo! Then you won't learn it either. I even gave you a code snippet, you just had to change "YourAppName" with a name of your choice.
#If B4J is not needed, because the code does nothing in B4A and B4I as described.
Xui.setdatafolder("TestThaiUtils")
Because this is a global folder in the app data? I don't want another class or program that was also developed with B4J to write to the same app data folder. That's why you specify a name.Why not it can't remember itself? Make easy to code.
I have error code undeclared variable 'setdatafolder'Because this is a global folder in the app data? I don't want another class or program that was also developed with B4J to write to the same app data folder. That's why you specify a name.
You should watch some tutorials of erel and other members on YouTube because you ask really basic questions and without minimal understanding it will be very difficult for youI have error code undeclared variable 'setdatafolder'
How do I code it
Dim setdatafolder as....?
I can't listen to English. I can only write and read a little.You should watch some tutorials of erel and other members on YouTube because you ask really basic questions and without minimal understanding it will be very difficult for you
No idea what you want with "Dim" now. But here is the code you need.Dim setdatafolder as....?
Public Sub Initialize
DataFileName = "Data_Temporary_File.map"
xui.SetDataFolder("YourAppName")
'DataPathName = File.DirInternal
DataPathName = xui.DefaultFolder
End Sub
works by me.After I coded at post #56 in Initailize,Why it still have error "setdatafolder must be called before using this method" I'm not sure that I set "YourAppName" correct ,or not? (Attached picture) I don't know where is my mistake. Please help me again.
Could mind send me to compare the code?works by me.
Maybe you should provide an example project which shows the error.