π‘ LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
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
nil
if 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
false
or en empty string.
Advertisement