Finder in Lion doesn't return the current selection in newly opened windows

Originator:tempelmann
Number:rdar://10362028 Date Originated:28 Oct 2011
Status:open Resolved:
Product:OS X Product Version:10.7.2
Classification:other bug Reproducible:always
 
Summary:
Apps that like to operate on the currently selected item(s) in the Finder don't work reliably in Lion any more due to this bug in Finder.

Steps to Reproduce:


Launch Script Editor and enter this little script, keep it ready for running (no need to save it):
  on run
    tell application "Finder" to get selection
  end run

Next, open a new window in Finder, e.g. by first closing all windows, then pressing Cmd-Shift-A to open the Apps folder.

Select any item in the window.

Switch to Script Editor and run the script.

Expected Results:
The results in the script editor should show the path of the selected item.

Actual Results:
The result is either empty or it shows the path of the folder of the window, but not the selected item in it.

However:
Once you switch back to the finder and then back to the script editor, without modifying the selection in the Finder, another run of the script will show the expected path of the selection, finally.

This shows that the Finder can indeed deliver the correct selection to apps, but only after a re-activation or additional selection changes.

This makes getting the Finder selection pretty unreliable. Please fix.

Note: I am using 4 spaces. If you can't reproduce it, make sure you have more than one.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!