-
if a subclass does not implement +initialize but its superclass does, then that superclass’s +initialize will be invoked once per non-implementing subclass and once for itself.
Mike Cohen
ICHC Crashes
I’ve been receiving a lot of reports of ICHC crashing recently. I’ve never been able to duplicate any of those crashes myself, but from looking at the crash logs available in iTunes Connect I have an idea of what’s crashing them.
The crashes seem to occur when restoring the last viewed item results in an index out of range. We use a scraped feed (which is hosted on one of ICHC’s servers) that returns pages of 10 items each, to reduce the load time. I’ve seen a few instances where items, usually videos, are missing from the scraped feed, and in that case it returns a page of fewer than 10 items. If you happen to have been viewing item 10 the last time you quit and the next time you end up with only 9 items, it will crash.
I’ve put in some error handling for that case, but if you’re experiencing that crash, I’d like to have you test it before I submit the update, so email me your device ID and I’ll add you to my beta list. Note that Apple can take several weeks to approve an update, so even if I submit it right away, it may be a while before the update becomes available.
This will be the last update to this version. I’m doing a major rewrite for version 2.0 using Three20, the framework used in the FaceBook app. This will be a free upgrade.
Before I do much on v2.0, I’m finishing a new application I plan to release first. More about that in the next few weeks.
How 1Password extension loads in 64-bit Safari in Snow Leopard
Kevin Ballard explains how 1Password is able to load an extention into Safari when running in 64-bit mode:
When Cocoa was introduced, one of the behaviors that every Cocoa application automatically acquired was the loading of Input Managers. These Input Managers were intended to allow developers to extend the text input system of OS X in ways that the system did not provide by default. However, these Input Managers were really nothing more than Cocoa bundles that got loaded by every single Cocoa app at launch. This means that it was very quickly abused to become a general plugin mechanism for applications that do not natively support plugins (such as Safari). In recent OS updates, Apple has been deprecating this mechanism, and now in Snow Leopard it’s completely gone for 64-bit apps.
Luckily, the smart folks who make 1Password came up with a solution for their upcoming 1Password 3.0 (which is in public beta right now).
AppleScript is a rather old technology, first introduced in System 7. It is a human-readable scripting language that can control any application that implements support for it, along with a slew of system functions. Under the hood, it sends Apple events to actually talk to each process.
Scripting additions are bundles that provide additional functionality to AppleScript, generally by installing Apple event handlers or doing Apple event data coercion.
The thing about scripting additions is that they will be potentially loaded by any process on the system. Generally, they get loaded into a process that attempts to use an AppleEvent that the scripting addition handles.
The ability to load a scripting addition into a target process simply by sending it an Apple event is the key mechanism that allows us to restore the old Input Manager functionality. And this is exactly what 1Password does. 1Password includes a scripting addition that handles the ONEP/Load Apple event with a context of “Process”. This handler takes a single argument, the path to a given bundle, and it loads that specified bundle into the target process. The last component is a background daemon called 1PasswordAgent. This daemon sends the ONEP/Load Apple event to Safari immediately after Safari is launched, causing Safari to load the 1Password WebKit plugin.
This actually sounds a lot cleaner than the input manager hack. I hope Apple doesn’t disable this in the future. Hopefully it will also provide a mechanism for 1Password to work in Opera & Google Chrome.
Easy way to add sound effects to your app
Every game needs sound effects. A free gem called cxfr makes it easy to create retro video game sound effects and export them for your game. You start with one of their presents like pickup, laser, explosion, hit, jump, or random and adjust the sound to your liking using sliders. You can then export your sound as a wav file to use in your Mac or iPhone applications.
links for 2009-09-03
-
Roger Ebert reviews the documentary about Youssou N'Dour
Staying in sync with Dropbox
For a long time I was using Windows Live Sync to synchronize a few folders between my MacBook & MacBook Pro, however it no longer seems to work in Snow Leopard.
I was also using Dropbox to create a shared folder although I wasn’t really using it as a synchronization tool. Dropbox only lets you share a single folder rather than selecting any folders you want to synchronize.
What I didn’t realize is that you can put a symbolic link to another folder inside your dropbox folder to synchronize it. A finder alias will NOT work; you have to use the command ‘ln -s’ in the terminal to create a symbolic link. Thanks to that little known feature, I’m able to use it to synchronize my entire documents folder, my source code, and several other folders.
I Can Has Cheezburger (free) 1.5.2 is available
I always love to get emails like this:
You can download it here. If you already own ICHC, it should appear as a free update.
Tip: try viewing it in landscape 🙂
I Can Has Cheezburger free version STILL not approved
I submitted version 1.5.2 of both the free & pro versions at the same time. As you know, ICHC Pro was approved a few days ago. The free version is still in review.
I got a call from Apple today asking about a contest (which I figured out was probably one of the ads). Thanks to AT&T’s wonderful wireless service, the call was dropped right in the middle. I wasn’t able to return the call and they haven’t called me back.

