Yet another SavePanel question
-
Hi everyone,
I have a savepanel question for you guys.
Is there any way to tell from the code if a savepanel was closed using "Cancel" or using "Ok"? Tried the documentation, didn't find any access to that particular thing.
Maybe you know if this sets some bit or something like that?Thanks a bundle,
- TaliG
-
The manual says it returns
nilif the user cancels. Is that not so? -
I think savepanel returns the selected path and filename as a String, or either false or nil when the Cancel button is used.
file = UI.savepanel if file # maybe check for other possible bad input, # do something useful with file. else # use hit cancel end -
I'm pretty sure I've tried these. I'll try it again...
-
Test the return value. The manual has been wrong before. It might be
falseor en empty string.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement