« Hotel rooms for Europ… | Home | MBS Booth ready for F… »

NativePath vs. AbsolutePath

For years Xojo had three types of paths on the folderItem class:
  • AbsolutePath
    For Mac the old MacClassic style for paths with semicolon as divider. For Windows and Linux this is native path.
  • NativePath, the native path for the OS, so you get the POSIX style path on MacOS. Same as absolute path for Linux and Windows. Introduced with Xojo 2013.
  • ShellPath, the escaped path for use in shell commands with shell class.
AbsolutePath has been deprecated for a while and may finally go with the next Xojo version. Time enough for us to look through thousands (Sic!) of examples and code snippets to find all places with AbsolutePath. Often we had code like this already:

#If RBVersion < 2013 Then
MsgBox "Failed to create file " + f.AbsolutePath
MsgBox "Failed to create file " + f.NativePath

But it is very annoying to write #If into hundreds of projects.

We got a nice idea to keep projects compiling in Real Studio (doesn't know NativePath) and the future Xojo versions (doesn't know AbsolutePath): Via plugin we add NativePath for Real Studio. All our projects can use NativePath and compile in older/newer versions.

So if you have AbsolutePath in the projects, it may be a good idea to replace it! Same for PathTypeAbsolute.
31 07 19 - 19:25