Page 1 of 1

files lister stack lock up

Posted: Tue Oct 28, 2008 7:52 pm
by billworld
Okay. Today's not my day for trying to learn RR. I downloaded the Files and Folder tutorial stack. I changed to folder to list files to my /Applications/ folder and RR locks up me. I have to force quit to get out. I didn't change any code or anything. All I did was try to change the directory.

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

Posted: Tue Oct 28, 2008 10:35 pm
by bn
Hi Bill,
you manage get the strangest errors. I tried your recipe and I couldnt reproduce the hang, Files and folders works without a flaw, at many folders I tried application an others. I can only guess at what is going on. Could it have to do something with permissions? Are you logged in as administrator?

'The directory' is new for me, I dont find it in the dictionary of Rev, but it works, it seems to be the same as the defaultFolder, which of cours is in the dictionary. Could someone please confirm:

the directory=the defaultfolder ?

or not.

As for the browser stack I also had problems with the get image example, sometimes it works sometimes it doesnt. Mostly when I try the example the first time it works, when I perform a search and retrieve a second image it didnt.

Most other examples I tried did work though and I learned a lot from them.
regards
Bernd

Posted: Tue Oct 28, 2008 10:50 pm
by Mark
Yes directory = defaultfolder