Solution for iTunes: "Credit card processing is temporarily unavailable."

The solution for:

Credit card processing is temporarily unavailable. You may continue to browse the store. Please try to make your purchase later.

from the iTunes Store turns out to be:

1. Select Store->View My Account from iTunes

2. Click "edit" next to your credit card info and enter the CVV or security code

3. Click "done" at the bottom.

 

How this matters for free updates, why this was necessary in the first place, or what it has to do with the error message recevied, is entirely unclear.  But it worked for me (tm).

 

 

And *why* I'm building PySide on the Mac

So I'm building PySide on the Mac as part of a new medical imaging endeavor.  For years I've wanted a usable mashup of ITK, VTK, Python, and Qt as a medical imaging toolkit.  Add numpy and scipy on the Python side, and you have a very powerful combination of software.  But if the interface to Python is achieved through automatically generated bindings for ITK, VTK, and Qt, you have a really brittle build.  I keep finding such projects that seem to thrive for a year or so and then die as it becomes impossible to support people's use of the bindings with changing toolkits and with Python itself evolving.

One way to deal with brittle builds is freeze each of the components at a particular version, and to upgrade only in a carefully tested and controlled manner.  For our own software releases, this is how we work.  But for new development and my own experimentation, it's nice to dream that you can build against a number of software packages, at random released or development versions, without having things break so frequently.  The strategy for doing this is to limit the points of intersection between the various packages.  The smaller the area of coverage of those interfaces, the more change tolerant they'll be (obviously).

At the moment, ITK, VTK, and Qt should be somewhat of a slam dunk.  They only intersect in carefully controlled places and things work well.  Adding language bindings for Python is troublesome, and the result may not be terribly satisfying (esp. in the case of heavily templated ITK).  So I've decided to limit the interface between Python and other software to interfaces that we write, explicitly, by hand.  We'll see how that goes.  

Being able to develop and extend the UI from Python is appealing, however.  If you're as old as I am, you may miss the good old days when Tcl/Tk came into existence and suddenly X applications flourished.  I'd like to get back there again.  Hell, we did surgical guidance with user interfaces glued together with Tcl, but when the community moved to ITK for imaging development, the pace of development changed.  You and I can write user interfaces in Qt with C++, but what we're missing is the ability to create specialized, possibly throw-away graphical user interfaces as easily as we create one-off Perl, Python, and Bash scripts.  That makes me want to break my earlier rule about small intersection points and look to expose serious amounts of Qt to Python.

There seem to be at least three sets of Python bindings for Qt right now, and I've just scratched the surface exploring them.  But I'm going to be biased, possibly unfairly, to PySide as it's hosted at qt.nokia.com and therefore, hopefully, has the weight of those resources behind it.  And that's why I'm building PySide.  

More on the project later.

Building Pyside on the Mac

So I'm building PySide on the Mac as part of a new imaging endeavor and after struggling with tons of:

type '...' is specified in typesystem, but not defined. This could potentially lead to compilation errors.

errors, I realized that '/usr/include' was being prepended to every path passed to the generator and, with the help of Google (why I'm writing this for *you*), I realized that there's a workaround:

//The Alternative value to QT_INCLUDE_DIR. Necessary to fix bug
// on cmake 2.8 MACOS users
ALTERNATIVE_QT_INCLUDE_DIR:PATH=/Library/Frameworks

This was set for a Qt installed from binary as Mac Frameworks and the variable should pop up in CMake for you to set manually.

Hope that helps someone!

Configuring which Google Apps Calendars are Sync'd to iOS 4.0 via ActiveSync

If you're using the "Exchange" method of synchronizing calendars and notice that not all of your multiple calendars from your Google Apps for Domains setup are being sync'd down, follow these instructions:

http://www.google.com/support/mobile/bin/answer.py?answer=139206

Basically, for those in the know, it's the usual m.google.com/sync stuff, but there's a link in the fine print at the bottom for Google Apps for Domains.

Also note: if someone directs you to a url with "iphoneselect" in it, that's only when accessing calendars in a non-push way through the iphone's "Gmail" setup.  If you use the Exchange setup for getting push calendars, follow the url I posted above.

 

 

 

Applescript to reload a web page in DevonThink Pro via Harvard's EZ-Proxy

I've started reading RSS feeds of various journals from within DEVONThink so I can pull out articles that relate to on-going work.  I wanted to be able to "live" within DT for this purpose and not have to open web pages in Safari or Firefox in order to use Harvard's "ezproxy" service.  To use Harvard's EZ-Proxy, you append ".ezp2.harvard.edu" to the end of subscription-only journal URL (just the hostname portion) and then log in.  So we'd change http://www.nature.com/x/y/z to http://www.nature.com.ezp2.harvard.edu/x/y/z.  The problem is that DT doesn't allow you to edit the URL of a loaded web page.

Applescript to the rescue.  Now while viewing a web page with "access denied!" from within DT, I can go to the scripts menu and choose Harvard EZProxy Reload and the page is refreshed with the altered URL.

Here's the code:

tell application id "com.devon-technologies.thinkpro2"
        try
                if not (exists think window 1) then error "No window is open."
                
                set old_URL to the URL of think window 1
                set pat to "'s@(https*://[^/]+)@\\1.ezp2.harvard.edu@'"
                
                set new_URL to ¬
                 do shell script "echo " & quoted form of old_URL & " t| perl -pe " & pat
set the URL of think window 1 to new_URL
                
        on error error_message number error_number
                if the error_number is not -128 then display alert "DEVONthink Pro" message error_message as warning
        end try
end tell

Note that the Error -128 exception is from one of DT's own scripts, so I'm not sure what that error is, precisely.  

Also note that the ¬ means "continue on next line."  You can just delete it and move the "do shell" line up.  This was done entirely to make Posterous happy.

Sorry that like many budding AppleScript authors, I wimped out and used Perl to parse the URL.


Feel free to comment as I'm a novice at AppleScript.