Tokens/Lozenges and literal space characters

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Tokens/Lozenges and literal space characters Wed Feb 13, 2008 1:37 am • by jesstech
Has anyone found a work-around for adding a literal space character between two tokens/lozenges in a pattern input? It seems, in Leopard at least, that any whitespace surrounding a token is neutralized.

What I'd like to do is have Hazel organize files in my downloads folder into date-based subfolders, like what Saft and SafariStand do for Safari. I've create a new rule to match anything that isn't a folder, and given it the action 'Sort file into subfolder' using the (Date Added) token for the pattern. However, I can't edit the token to use (Month Year), as it strips out the space character and uses (MonthYear) instead. I do not want to use an underscore or dash because I still want to use Saft's preference when possible.

This issue isn't exclusive to Hazel, as I have had this problem before with other programs like iStat Menu, which uses them to format the clock. Can anyone confirm if this is a leopard-only bug and does anyone know of a possible workaround? I have tried using other space characters (non-breaking, en, em, etc) from the Special Characters palette but they all get trimmed as well.
jesstech
 
Posts: 1
Joined: Wed Feb 13, 2008 1:24 am

Wed Feb 13, 2008 2:43 pm • by Mr_Noodle
It's an Apple bug introduced in 10.5.2. Personally, I'd wish that Apple would stop futzing with the token field code as they seem to keep breaking things every time they touch it.

I've filed a bug with them and may have to end up opening up a DTS incident with them if they don't do anything about it but it is really annoying. I don't know of a workaround just yet. The only thing I can recommend is using characters that take up less visual space, like dots or something.

The weird thing is that the International preference pane does not exhibit this problem when editing the date/time formats. So, either they are using special hooks that the rest of us don't have access to or there's some weird non-obvious workaround that it's using, or they're not using NSTokenField.

In any case, I'll post here if I find out anything more (and please report if you find anything out yourself).
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Wed Feb 13, 2008 6:38 pm • by Mr_Noodle
Been discussing this on the dev list and someone has suggested a workaround. I'm going to test it for a bit here. Also, I'll probably wait a little while to see if any other 10.5.2 bugs fall out of the woodwork but if all goes well, there should be a fix for this in the next patch release. I hope you can hang on until then.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Tue Feb 19, 2008 11:03 am • by Mr_Noodle
Just letting you know that Hazel 2.1.5 is out, which fixes this issue. Give it a try and let me know.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Sat Mar 15, 2008 6:18 pm • by sjk
Mr_Noodle wrote:Been discussing this on the dev list and someone has suggested a workaround.

Which list is that?
sjk
 
Posts: 332
Joined: Thu Aug 02, 2007 5:43 pm
Location: Eugene

sjk wrote:Which list is that?


This is the Apple developer list, specifically, the Cocoa dev one.
Mr_Noodle
Site Admin
 
Posts: 11236
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support