Page 1 of 1
Problem with filerequest()
Posted: Mon Aug 07, 2023 11:23 am
by papiosaur
Hello,
i use
FileRequest() and the condition to abort the selection i see in some example is:
or
Code: Select all
if file$ = "" then print("Request cancelled")
The problem i define a default file in my project and if i click on "Cancel" button, file$ is different than "" and selection is not cancelled...
An idea to resolve that please ?
Thanks for your help.
Re: Problem with filerequest()
Posted: Tue Aug 08, 2023 10:28 pm
by airsoftsoftwair
papiosaur wrote: ↑Mon Aug 07, 2023 11:23 am
The problem i define a default file in my project and if i click on "Cancel" button, file$ is different than "" and selection is not cancelled...
What do you mean by "selection is not cancelled"?
Re: Problem with filerequest()
Posted: Tue Aug 08, 2023 10:35 pm
by papiosaur
If i click on Cancel button from the requester, it continue to execute the script because file$ <> ""
Re: Problem with filerequest()
Posted: Wed Aug 09, 2023 8:03 am
by jPV
I haven't seen any issues with
FileRequest(). Can you provide a short full example code how to reproduce the issue (
MCVE)?
Re: Problem with filerequest()
Posted: Wed Aug 09, 2023 9:49 am
by papiosaur
With retest, the problem comes when i execute my script from Hollywood command.
When i launch from compiled executable and when i click on Cancel button in the requester, the soft "END".
I try to write a full example soon.
Re: Problem with filerequest()
Posted: Wed Aug 09, 2023 2:16 pm
by papiosaur
I think my problem come from a bad example with file$ as variable for the file instead f$...
I have changed all variable from file$ to f$ and will retest.
"File" is an argument for
FileRequest(), i think it cause some troubles...