Archive for October 4, 2012

Thursday, October 4, 2012 [Tweets] [Favorites]

__unsafe_unretained

Mark Dalrymple:

There are some classes that can’t have weak references assigned to them, such as NSImage and NSFont (and others). In OS X 10.7 you can’t have weak references to those, and other classes like NSWindow or NSWindowController (and others), due to legacy or technical details, such as a custom retain and release implementation (Thanks to Mike Ash for the hint as to why some of these classes are off-limits). But there are times you might want to point to them and not create a strong reference. Perhaps it’s to break a retain cycle. You’d use __unsafe_unretained for those.

Google Settles Book-Scanning Lawsuit With Publishers

David Kravets:

Andi Sporkin, a spokeswoman for the settling publishers, said the deal grants Google the rights to display up to 20 percent of the work, and also grants Google permission to sell the books and journals via Google Play, its online and Android-based marketplace.

Your Future Self Will Thank You

Paul Kim:

I ended up removing that code while doing the fix thinking I must have been drunk/high/had a gun to my head when I wrote that code originally. Initial tests seemed to confirm it as things were working at first. A couple days later I discovered an older bug had resurfaced. Sure enough, I began to realize why I wrote that odd piece of code back when.

I Love My Kindle, But It Drives Me Crazy

Jason Snell:

Occasionally I read a book with footnotes placed at the back, which throws Whispersync for a loop. But a more common problem crops up when someone else in my family wants to read a book I’ve already read: Since I’ve read to the end, Whispersync is no help until I open that copy of my book on all my devices, navigate back to the beginning, and then go to the Amazon website, find the book in question, and choose Reset Furthest Page Read.

And then there are the problems with updating books.

Info Man

Dr. Drang:

Linux man pages were often extremely short stubs that said little beyond “go to the info page.” OS X man pages, thank goodness, aren’t that stripped down, but they have their own problem: they sometimes tell you to go to an info page that doesn’t exist.

xkcd-Style Graphs in Mathematica

A fun question on the Mathematica Stack Exchange.

Multiple Backups for iPhone, iPod, and iPad

Rene Ritchie:

Sure, convenience is king, and that’s why iCloud is so important—it does everything for you with absolutely no time or effort on your part. But you get out what you put in, so once in a while plug into iTunes and hit the backup button as well. Heck, if your iPhone or iPad is your life, plug into something like PhoneView and do a second backup as well. Keep the iTunes copy in the default folder, put the PhoneView archive in Dropbox. The more important your data, the better you need to take care of it. Apple absolutely has to make sure the technology works, but making the best use possible of that technology it is our responsibility.

Bitcoin Non-Technical FAQ

Oleg Andreev:

Bitcoin is a peer-to-peer digital currency. It does not depend on any particular organization or a person and is not backed by any commodity like gold or silver. Bitcoin is a name for both the currency and for the protocol of storage and exchange. Just like any other money (dollars, gold or sea shells), Bitcoin does not have much direct use value. It is valued subjectively according to one’s ability to exchange it for goods.

AESendMessage Bug in Mac OS X 10.8.2

Brian Webster:

The basic outline of the problem is that sometimes a particular application will get into a state where any events sent to it using AESendMessage (or AESend, for that matter) would not be delivered to the target application, and AESendMessage would simply block until the timeout value was reached, then return an errAETimeout error code.

This affected his iPhoto Library Manager as well as e-mail clients such as MailMate, Postbox, and GyazMail communicating with SpamSieve. The bug can also affect TotalFinder and applications that use the ODBEditor events.

As a short-term fix, you can log out of your Mac or kill the appleeventsd process. Medium-term, the applications sending the events can be rewritten to use typeKernelProcessID rather than typeSignature or typeApplicationBundleID to specify the target application. Of course, we hope that Apple will eventually fix the bug.

Update (2012-10-05): This bug also seems to cause hangs at launch for applications using the Growl 1.3 SDK.

Update (2013-03-16): The bug appears to be fixed in Mac OS X 10.8.3.

Update (2013-10-29): It looks like this bug may be back in Mac OS X 10.9 Mavericks.