Le 26/10/2012 à 22:32, Christopher Stone < email@hidden> a écrit : Hey Yvan,
On Oct 26, 2012, at 03:23, koenig.yvan < email@hidden> wrote: (1) Is it a good idea to create a new script relying upon list folder which is deprecated ?
At this point I don't really care. Deprecated doesn't mean it'll go away very soon, but I'll think it over. (2) We may select several items in the choose file dialog but if we do that, the script fails with the error message : the file "the:folder:New_File_Here! Templates:firstemplate.jpgsecondtemplate.tiff: is unavailable.
Whups. I forgot to test that. Thanks for doing it for me. :)
I'll fix it in a sec.
Hello
for the first point.
If feel that it's useful to repeat that from time to time because I receive quite once a week messages from users asking me about scripts which no longer work because something has changed in the AppleScript behavior. So I think that it's good practice to drop deprecated functions when we build new scripts or when for this or that reason we must edit an old one. This way we would reduce the number of problems when the feature will really disapear. Just one example (in fact it's not linked to AppleScript). For year I wrote that it's bad practice to include slashes in file names. When they introduced OS X, Apple was fair enough to include a piece of code accepting them because they were legal characters in older systems. Alas, a lot of users continued to use / in their filenames. And what was supposed to strike really striked with Lion. One or two features of iWork applications failed when filenames were embedding slashes. I don't know if Apple deliberately decided to drop the support of such filenames or if it's just that somebody was unaware of the old fair code. But in such case, from my point of view, users were not really serious. The number of true bugs is sufficient to take care to what is an odd behavior.
I saw that you dropped list folder. On my side I do my best to code without Finder calls but when working with the windows is required there is a single app to use.
I was ready to file this message when I received your new one. I made a test in a hurry. Works fine.
Just a comment : if it's not for your own use, I think that it would be fine to replace "Pick one" by "Pick one or more" because when the prompt say pick one it's not logical to guess that we may choose more.
Yvan KOENIG (VALLAURIS, France) vendredi 26 octobre 2012 23:36:14
|