How does 'Create Folder' give its result?

Graham Samuel livfoss at mac.com
Fri Mar 17 11:02:17 EST 2006


Thanks to all who replied about this. I think Jacque must have been  
right about my somehow delaying looking at 'the result' - it really  
happened but now I can't reproduce it. Anyway, Jim Ault's suggestion

> Try this snippet and see what you get
>
>  create folder "cde:/illegal:name/"
>   get the result
>   if it is not empty then
>     beep
>     put it
>     answer error it -->"can't create that directory"
>   end if

Worked exactly as advertised. So what I described was an unexplained  
glitch, possibly something to do with the IDE. The cause of the error  
in the first place is something of a mystery to me, and I wondered if  
it was something to do with the way the RR engine translates path  
strings from Unix-style to Windows-style on the fly. As happens to me  
all too often, a search of the documentation didn't reveal anything  
about this...

Richard G asked

> The hard part is determining exactly what went wrong.  When a file or
> folder creation error happens, in most cases all the result says is
> "can't create file" or "can't create folder" with no further
> explanation.  How do you advise your users?
Basically, I tell them to pick a folder for themselves rather than  
letting the app create one for them, as it's failed to do this. It's  
a crude approach and I'm not sure how it's going to play when the  
public (UK teachers) gets hold of it. It's about to go on a  
controlled beta, so we'll see.

As to 'try', as suggested by Stephen Barncard apparently is  
inappropriate. I've never used 'try', so I might do so in another  
context if I can get my head round it (reading about it once wasn't  
enough for me to get the idea, but I learn more slowly these days). I  
guess it comes from a context I don't know.

Graham
----------------------------------------
Graham Samuel / The Living Fossil Co. / UK and France




More information about the Use-livecode mailing list