pooriaazimi / BetterDictionary

Bookmark words in Apple's Dictionary.app
http://pooriaazimi.github.io/BetterDictionary
238 stars 28 forks source link

Save disabled on Mountain Lion #2

Closed jonfish closed 11 years ago

jonfish commented 11 years ago

On Mountain Lion 10.8.2, it is not possible to save - the + icon is greyed out and Command-S doesn't work.

pooriaazimi commented 11 years ago

Hi,

Ever since ML came out I wanted to fix these problems, but never got around doing them. But I stayed up last night and fixed all these nasty issues and it should be working now.

I haven't pushed the fix to GitHub, because I'm not sure if it it works 100% right, and I don't have an spare Mac at the moment, and can't restart my 10.8.2 machine (right now) to test it on Lion and Snow Leopard.

_The biggest problem I faced last night was with NSUserDefaults. When you do [[NSUserDefaults] standard default] synchronize] it's supposed to write the new data to file immediately. But for some reason ML doesn't do that (it takes about 2 minutes for it to sync...). So I had to move savedWordsArray away from NSUserDefaults and give it a proper application support folder (in ~/Library/Application Support/BetterDictionary/saved-words.plist). It should pull the existing saved words from NSUserDefaults and write it to the new location and keep appending to it._

Anyway, here's the fixed version. I'd be thankful if you could try it and see if it works so I can push the fix to GitHub.

http://d.pr/f/jAx9

Thanks, Pooria

jonfish commented 11 years ago

The new version works perfectly! WELL DONE.