[quote=21348:@Joe Ranieri]Not true in all cases. ShellPath escapes characters that can’t safely be passed to a shell, like spaces. NativePath does not and is simply the POSIX path to the file.
Deprecated doesn’t mean being removed. And for what it’s worth, you don’t need HFS-style paths to deal with AppleScript. See Aliases and Files from the AppleScript Language Guide.
It’s behaving correctly.[/quote]
Well Joe it seems that in my case it does not behaves correctly , i have a RealBasic project that i have to convert to XOJO and i replaced all the AbsolutePath with NativePath and once i open first time the preference file with the xojo, it replaces :users:username:documents:thefolder with /users/username/documents/thefolder and than it crashes the app because it cannot find the specific folder. if i start the old rs software as well it crashes because it does not find the folder as well.
Off topic, does it matters that i`m opening the old rsd files with xojo and i state in the code that instead of RealSQLDatabase are SQLiteDatabase ? it affects the structure or it corrupts the data ? we have few hundreds of clients and the xojo upgrade should not ruin the database or the data that the clients have locally.
In general, I recommend starting a new conversation rather than piggy-backing on a 1.5 year old one that may not be directly related.
With that said, it seems unlikely that NativePath is not working correctly. It is more likely that some part of your code is depending on the old style and is failing (perhaps with an exception) when you switched to the new style. FolderItem access should never crash an app if you are catching exceptions. In the new conversation, post a sample of the code that is now crashing your app.
Both of those are SQLite3 format databases, so there is no difference in structure. As far as code goes, there is some differences in how transaction processing is done. Also rowids without a specific primary key might cause issues with RecordSet.Update.
sFolderItem = new folderItem(recSet.field("value").stringValue)
if not(sFolderItem.exists) then
msgbox("Folder does not exist.")
app.sFolderItem = new folderItem(recSet.field("value").stringValue)
and in the debug on run if i look on the recSet (record set ) output i get as a response for the value field SSD:Users:aurelian:Documents:Srg , if i run the code with this path the app works perfectly, once i start the xojo app with the native path the database changes to /Users/aurelian/Documents/Srg and the statement trows the “Folder does not exist.” messagebox.
In this case what should i do ? it is related to the Path changes or to FolderItem . once first time the app runs the old app crashes and the old one as well.
Well to answer my own question , it seems that sFolderItem = new folderItem(recSet.field("value").stringValue, FolderItem.PathTypeNative) fixed the issue. so maybe it will be help for others that face the same issue.