Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A quick fix script for a column view bug Desktop
I've been working around a strange bug in the Mac OS X Finder with an AppleScript for quite some time now. Most users don't notice the bug at all, but I do. Rather than describe it, follow these steps and see it for yourself:
  1. Make a new Finder window
  2. Set its view style to column
  3. Adjust the column width/s with the slider, making them wider together
  4. Leave the window open and log out
  5. Log back in. At this point, your window will be open, but its columns will be at OS X's default widths.
  6. Close that window
  7. Open a new Finder window (should default to column view now)
Now, you'll see your custom widths respected. It just seems to affect the first window you make or see that's in column view. This bothers me, honestly, and I wrote a tiny -- and really dim-witted -- AppleScript to get around the problem.

Read the rest of the article for the script...

Here's the script. It works best when run at login automatically:
on run
tell application "Finder"
if (count of windows) is greater than 0 then
set daWindows to (every Finder window whose current view is column view) as list
set dork to (item 1 of daWindows)
set {dorkTarget, dorkPosition} to {(target of dork), (position of dork)}
close dork
set arf to (make new Finder window)
-- you can remove the next command if your default command-n window is a
-- window set to column view, or if you don't like your command-n window
-- reset to column view
set current view of arf to column view
set {(target of arf), (position of arf)} to {(dorkTarget), (dorkPosition)}
else if (count of windows) is equal to 0 then
set fix to (make new Finder window)
close fix
end if
end tell
end run
The script used to be even dumber, but at least now it identifies the topmost window set to column view (really, it doesn't, but luckily, the first item put into daWindows is the topmost window set to column view), opens a new window set to column view, takes that window to wherever it was before it was closed, and repositions it to wherever it was before it was closed. The only drawback is that the line "set current view of arf to column view" resets your default window to column view. I don't use this line at all, myself, 'cause my new Finder window (command-n) is already in column view when it appears.

I wish the script were smarter, obviously. I'd like to fix that problem I just noted, as well as add the reindexing of the window so it goes to the z-axis position it was at before it was closed [e.g., if it was the bottom-most window, put it back there]. I'd also like to be able to combine the opening and positioning of the new Finder window into one line, but can't figure out how to do it while attaching a variable to that window so I can reset its target. Oh well, I suppose. I'm sure someone can hack it if they need to fix something they don't like! Go open source!

Anyway, the script gives me back some of my sanity, so perhaps it'll do the same for some other Mac OS X users bothered by this Finder shortcoming.
  • Currently 1.33 / 5
  You rated: 1 / 5 (3 votes cast)

A quick fix script for a column view bug | 2 comments | Create New Account
Click here to return to the 'A quick fix script for a column view bug' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Authored by: DeusExMachina on Mar 28, '02 09:27:38PM

This is one of my biggest irritations with X. I only just realized that the bug didn't manifest on all windows, so I was a long way from figuring out that it only effected the frontmost one. Thanks for saving me the debugging!

Of course I only log in about once every two or three months, but each time... oh man :)


[ Reply to This | # ]
Re: Thanks!
Authored by: Mikey-San on Mar 29, '02 09:20:43PM

Well, I'm sure I'm not the only one who's sent a report about this to Apple. Perhaps if enough people use my script (or a variant of it, or another script entirely) to work around the problem, Apple will nip the problem in the bud.


[ Reply to This | # ]