How does 'Create Folder' give its result?
Jim Ault
JimAultWins at yahoo.com
Thu Mar 16 15:29:47 EST 2006
> Thanks for the reply, but my point is that the 'create folder'
> function doesn't appear to me to return anything in 'the result' when
> an error occurs: 'the result' just goes on being empty - but the
> command does apparently generate an error text because I can see it
> in the message box. So I still want to know where this text is put -
> the docs don't say **anything** about what happens if this command
> encounters an error. I just hope someone knows...
>
> Of course it could be a bug in RR 2.7.0, but to show this we'd have
> to know what the expected behaviour really is. BTW I've only seen
> this on Windows up to now.
>
> Graham
>
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
Jim Ault
Las Vegas
On 3/16/06 12:17 PM, "Graham Samuel" <livfoss at mac.com> wrote:
> On Thu, 16 Mar 2006 at 07:55:07 -0800, Rob Cozens <rcozens at pon.net>
> wrote:
>>
>> Hi Graham,
>>
>>
>>> As 'create' is not a function, I don't see any other way for it to
>>> return a value.
>>>
>>
>> Commands can return a value in "the result."
>>
>> create folder myPath
>> get the result
>> if it is not empty then
>> beep
>> answer error it
>> end if
>>
>> While not pertinent in this context, commands & functions can also
>> return values via referenced parameters:
>
> [snip]
>
> ----------------------------------------
> Graham Samuel / The Living Fossil Co. / UK and France
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list