Hi All,
I am having issues with the built in dialogs for opening and saving files
in ULP on OSX. I'm running 7.6.0. If I specify the filter directly as a
string within the functions,
e.g.
fileName = dlgFileOpen("Choose File...", EAGLE_HOME, "MyFileType
(*.mytype)");
or
fileName = dlgFileSave("Choose File...", EAGLE_HOME, "MyFileType
(*.mytype)");
Then the filters are correctly applied (albeit the dialogs are a little
clunky and quirky in operation....) and for saving it correctly applies
mytype to the filename and for opening it only allows me to choose files
of the correct type.
If however I want to pass a string variable to the dialog, e.g. I want a
generic function which incorporates a call to these but depending upon
where it is called in my code I want the file types to be different. So I
have something like :
void myOpenFunction (string fileType) {
string fileName = dlgFileOpen("Choose File...", EAGLE_HOME, fileType);
// Do some other stuff....
}
However, in this scenario the file type specification is being completely
ignored for both open and save operations. Does anybody have any ideas?
I can work around this by duplicating everything else so I have a function
call per type but that's wasteful as I prefer to reuse code as much as I
can and not have duplication so I would like to get this resolved.
Many thanks,
Rachael
--
Web access to CadSoft support forums at www.eaglecentral.ca. Where the CadSoft EAGLE community meets.