Hello,
I’d like an export dialog to allow 5 file types (png, jpg, tif, bmp and gif). Currently, the dialog doesn’t visually append the extension to the filename, although my code specifically sets it.
The “Show extension” checkbox is hidden and I can’t make it visible, even with the appropriate call (MBS).
Also, whatever extension I add from within the dialog is accepted; the extension is added to the result (e.g. I enter “untitled.xyz” and the file is named “untitled.xyz.png”).
Looks like the “Show extension” checkbox is the culprit, but I can’t make it showing…
Here’s my code:
dim i As Integer
dim s As NSSavePanelMBS
s=new NSSavePanelMBS
s.setAllowedFileTypes Array("PNG","JPG","TIF","BMP","GIF")
s.allowsOtherFileTypes=False
s.canSelectHiddenExtension=True
s.frameAutosaveName="Export"
s.Message="Select target file:"
s.NameFieldLabel="Export to:"
s.NameFieldStringValue=me.Window.Title+".PNG"
s.Prompt="Export"
s.Show
i=s.runModal
Any idea?