Problem with filerequest()

Discuss GUI programming with the RapaGUI plugin here
Post Reply
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Problem with filerequest()

Post by papiosaur »

Hello,

i use FileRequest() and the condition to abort the selection i see in some example is:

Code: Select all

if file$ = "" then End
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.
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with filerequest()

Post 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"?
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Re: Problem with filerequest()

Post by papiosaur »

If i click on Cancel button from the requester, it continue to execute the script because file$ <> ""
User avatar
jPV
Posts: 604
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: Problem with filerequest()

Post by jPV »

I haven't seen any issues with FileRequest(). Can you provide a short full example code how to reproduce the issue (MCVE)?
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Re: Problem with filerequest()

Post 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.
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Re: Problem with filerequest()

Post 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...
Post Reply