Global variable to hold folder location TTMSFNCCloudItem is overwritten/corrupted

I've based my prototype on the bundled CloudStorageServiceDemo project. That project has a CurrentFolder variable of type TTMSFNCCloudItem which keeps track of the currently selected folder as the user navigates the hierarchy.

In a similar fashion I want to keep track of a selected folder where files will be uploaded to, so I have declared a global variable Cloud_Folder, also of type TTMSFNCCloudItem to reference this. However this variable is being overwritten as the program executes.

Am I missing something about how global variables interact with FNC Cloud Pack?

If I create a new instance of a TTMSFNCCloudItem, that requires a TCollection parameter which I can't see any documentation for.

Sorry, I'm probably doing something basically wrong here, but I would appreciate any help offered.




You should not instantiate TTMSFNCCloudItem collection item classes. The way to interact with files/folders is by using:

CloudStorage.GetFolderList (retrieves are all current items)