I am trying to understand how the couple GetRelative and GetSaveInfo works and I have very hard time to understand (both example are the same, for me).
So, a minute ago, I stripped one example and changed it a bit like what is below.
That example stores the path to where my Project is located, not to the
Documents folder as the parameter suggests (and this is what I get in my real code *).
Dim f As FolderItem Dim Info As String f = New FolderItem Info = f.GetSaveInfo(SpecialFolder.Documents, FolderItem.SaveInfoDefaultMode) MsgBox Info
Original code from the LR ( FolderItem.GetRelative ):
Dim f, g As FolderItem f = New FolderItem g = f.GetRelative(f.GetSaveInfo(Volume(0).Child("Documents"), FolderItem.SaveInfoDefaultMode)) If g <> Nil Then TextField1.Text = g.NativePath Else MsgBox("FolderItem does not exist!") // Isn’t "Item not found" a better answer ? End If
I think I now understand how to deal with that (unsure until I will be able to do the GetRelative part), but I want to understand if I am wrong or right in my LR code analyze.
In fact, I get far worse: the project folder name length is far more than 27 characters long, so I let you imagine what I get in that Folder name… (the folder name is truncated and I get a # followed by alphanumerical [Hexadecimal ?] values in the first part of the Info string (the complete name near the end of the Info string).