TAdvBoxNetDrive->GetFolderInfo() Broken

We're trying to add Box support to our application as we did for DropBox and have run into problems, at least with C++.

This code needs to get the folder info for later use with the Upload() function:


TBoxNetItems *FolderTest = NULL;
Box->GetFolderInfo("MyFolder", FolderTest); // Box is an instance of TAdvBoxNetDrive



Whether or not the folder named "MyFolder" exists at the root of the Box drive or not, FolderTest remains NULL and never receives a value. Thus it is impossible to upload any file into any folder, other than root, because we cannot obtain the TBoxNetItem pointer that the Upload() function requires.

This is similar to the Upload() function in your TAdvDropBox class that crashes when used (See forum http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=3584&title=tdropboxitem-c-issue).

It is incredibly frustrating to be unable to do the simplest of tasks. Please fix your code so that fundamental functions are no longer broken, and we can use the sofware we paid for successfully.

Hi,


This issue has now been fixed.
The update will be available with the next release of the TMS Cloud Pack.



Well I just installed version 2.5.0.1 and this issue has NOT been fixed. Now instead of getting a NULL pointer result in the TBoxNetItems pointer passed into the function, I get an Access Violation crash! Please fix ASAP!

Under specific circumstances an Access Violation could indeed occur.
This has now been fixed.


Please note that TAdvBoxNetDrive functions a little different than TAdvDropBox because of the way the Box API works.
You'll first have to call AdvBoxNetDrive.GetFolderInfo to retrieve a list of files and folders, then select the specific Folder you wan to upload files to from the AdvBoxNetDrive.BoxNetDrive collection.

A general example for this technique can be found in the CloudStorageDemo application (included with the product download).



Doing a search for "GetFolderInfo" in your CloudStorageDemo application code yields zero results, which is strange since you said it would have to be called first. You demo application is very narrow in it's assumptions - primarily that user interaction and thus a TreeView are going to be used. However I have no need for user interaction or display, so using a TreeView is highly inefficient at best. A broader range of code testing scenarios would improve your products stability.

GetFolderInfo is a method of TAdvBoxNetDrive.
In the demo GetDriveInfo() is used, that internally calls GetFolderInfo().

As in your case you only need updated information about one folder, you can use GetFolderInfo that is in this case more efficient than GetDriveInfo.