I have a handler that starts ...
on getSelection() tell application "Finder" activate set selList to get selection
It has worked flawlessly in Leopard, Snow Leopard and Lion. But, in Mt Lion there is a problem: 1. Open a folder (folder 1) 2. Double click a sub-folder, opening folder 2 (which leaves its icon selected in folder 1) 3. Select an item in folder 2. 4. run the script above. The selList should contain the item selected in step 3. But, it does not! selList contains the folder selected in step 2. If you run the script as second time it will respond correctly.
This has been causing me a problem all afternoon. It was damn hard to find because I thought the problem was my script. But it's there. I've tried all sorts of fixes, but nothing worked. Putting a 'display dialog' after activate will fix it, but I don't want that.
The first time you run the script, selection is in the window behind the window displayed as frontmost. Which is NOT correct!
Does anyone else get this result in Mt Goat?
|