Tried a second time with the same result.
What gives? If there's some condition that needs to prevent navigating out of a particular folder or the like, the sample code should accommodate this.
These examples need to be more robust IMO. Doesn't bode well for first-timers researching the product.
I see the following at the bottom of the docs. Would inserting this solve the problem? If so, why the heck wasn't it in the example code to begin with?
Code: Select all
Hint: Although in this tutorial it has been neglected, it is good practice always to preserve the value of the directory in each function or handler you write. The directory is a global property and changing it is a common source of bugs in programs. The easy way to eliminate all errors of this sort is simply to add the following code around everywhere you change the directory
local tDirectory
put the directory into tDirectory
set the directory to pDirectory
# Insert code using the new directory here
set the directory to tDirectory