Monthly Archive for August, 2005

Jamiroquai coming to Australia!

I found this via a post on the Jamline Yahoo! user group, but according to SonyBMG, Jamiroquai will be performing around Australia at the end of November/start of December. Woohoo!

The Sydney concert is on the 2nd December at Centennial Park (interesting…), and tickets go on sale on the 5th via VISA Entertainment and on the 16th via TicketMaster.

I can't wait!!!

Are dialogs too easy?

François Joseph de Kermadec over at the O'Reilly MacDevCenter asks if dialogs in their current state are too easy:

Modern dialogs, on any interface, come with a default "OK" button that one can systematically trigger by pressing return or enter on our keyboards. It's easy, tempting and a seemingly quick solution.

I would tend to agree. It's all too easy, when shown a dialog, to hit enter or click on "OK" without thinking. If the action happens to be destructive (i.e. non-reversible), then some cursing might ensue.

However, I don't think implementing a text field that requires you to type "yes" or "no" is the solution. The approach that was revealed in iTunes 4.9 (highlighted by Fraser Speirs) is a good solution. Instead of "Yes"/"No"/"Cancel", verbs are used: "Move to Trash"/"Keep Files"/"Cancel", which (hopefully) forces the user to look at the dialog and think before continuing. After seeing that post by Fraser, we modified the way Connoisseur behaved. I certainly find it clearer when using the application now.

UPDATE: I think this is probably one of the worst dialogs I've seen:

iTunes Sync Dialog

Despite the fact that there's a lengthy explanation, who's going to read it? The user only sees the "Yes" and "No" buttons (it's one redeeming feature is that "No" is the default. Phew!) After a casual glance, the user is likely to have no idea that by clicking "Yes", their entire iPod will be wiped and re-synced with the current computer. Argh. The amount of people that have done this and emailed us about it is astounding!

Instead, why bot have "Wipe iPod" and "Keep iPod" as the options? I'm sure there are better solutions to this, but that's about all I can scrounge up at this time, at the butt-end of the week. :)

*Insert random expletive here*

So I've been fudging around with the internal drive in my PowerBook for the past few days, with little luck in fixing it, despite the fact that it occasionally mounts and doesn't have any disk errors. *sigh*

However… not everything's peachy. I came home tonight, turned on the Firewire drive (a MacPower Icecube II)… and nothing. The light turned on, but the hard disk didn't spin up. Ironically, when booting up the PowerBook, it boots off the problematic internal hard disk with no problems! WTF?! So now I have a working PowerBook, but a dud external drive (on which all of my latest Uni work and mail is) and no way to access it.

Sometimes I hate technology…

Hard disk crash (again)

My PowerBook decided it wasn't going to recognise the hard disk on Tuesday morning… a PRAM reset (on Dad's recommendation) seemed to fix it, but there were disk errors. Thankfully, no mechanical problems!

I tried a number of times to fix it using Disk Utility and Disk Warrior, but got some error about the journal when trying to replace the directory…

*… must back up more often …*

The only solution I could see was to backup the disk, wipe it, and then do a restore. Unfortuantely, I didn't have an external drive! After shopping around for a bit, I order a 250Gb Icecube Generation II Firewire 400/USB2 hard disk from Express Powermac Solutions, which arrived this morning at work.

I'm currently doing a disk copy from the internal drive to a partition on the external, using a similar command to what Christoph used when his drive died:

dd bs=512 if=/dev/disk0s3 of=/dev/disk1s3 conv=noerror,sync

Hopefully it'll work. *fingers crossed*

This is probably the fourth or fifth time I've had to do a reformat in the past 2 1/2 years with this computer. I don't know what the frequency is for others, but it seems like a lot to me. What I want to know is, why does this corruption still occur? We've got complex filesystems and journalling, but still, every now and then, the "catalog" or "catalog hierarchy" manages to shoot itself in the foot, scrambling a few bits and rendering the drive unusable. Argh! Why can't these damn things be more reliable?!

UPDATE: I didn't mention this earlier, but the hard disk in the machine is dead. *sigh* Attempts to erase and re-partition it in Disk Utility (or using the diskutil command) have resulted in time-outs. Luckily, I got all my data onto the external drive, but I have a PowerBook than is now literally chained to the desk! I'm hoping to swap out the drive with an old one early next week. Dammit.

Michael McCracken: I want to tag it all

Michael McCracken says:

I just had a serious urge to tag my emails. And chats. And, of course, songs.

This is something I would LOVE to see in Mail. I'd pay for it!!! I have so many emails floating around and so many areas to deal with that being able to assign an arbitrary tag (keyword is probably a better name, and less buzz-wordy) would be a huge benefit to me.

A commenter pointed out there is a plugin for Mail called Mail Tags that aims to do this. I'm going to try using this, but it would be great to see this built into Mail itself in the future.

Apple, are you listening?

UPDATE: It would help if I linked to the damn thing…

How to: Compile an application for 10.2 (or 10.3) using Xcode 2.1

Tonight, we finally released an update to iPodRip that allowed it to work again on 10.2 and 10.3 systems, as well as iTunes 4.9. Unfortunately, this release took WAY too long to get out, due to a number of reasons.

One of these is that both Mat and I failed to realise that when upgrading to Xcode 2.1 (and thus GCC 4), you can no longer compile for 10.2 and 10.3 systems earlier than 10.3.9. Bugger. We found this out the hard way, with tons and tons of emails coming in from angry users who could no longer run their beloved iPodRip! To put salt in the wound, iPodRip 3.8.1 still had problems reading iPods that had been used with iTunes 4.9, necessitating a re-write of the parser. Obviously, we didn't handle this as well as we should have, and we hope to have more reliable releases in the future.

Anyway, back to the topic of compiling for 10.2 and 10.3 using Xcode 2.1. We got a bunch of crash reports containing one of the following:

dyld: /Users/jflowers/Desktop/iPodRip.app/Contents/MacOS/iPodRip can't open library: /usr/lib/libgcc_s.1.dylib (No such file or directory, errno = 2)

dyld: /Volumes/iPodRip/iPodRip.app/Contents/MacOS/iPodRip can't open library: /usr/lib/libmx.A.dylib (No such file or directory, errno = 2)

The problem

We later found out (after a lot of searching and digging around) that GCC 4 uses a couple of shared libraries (libgcc_s and libmx) that are not available on earlier systems. Since GCC 4 is the default compiler when Xcode 2.1 is installed, this means that trying to compile an application without changing any settings will result in it not launching on systems earlier to 10.3.9. Ouch.

Tonight I found a page that mentions the incompatibility between GCC 4 and systems earlier than 10.3.9, but it doesn't contain any of the error messages (as above), which made it quite hard to find. Then again, maybe I'm just blind.

The solution

Right. So now that we know what the problem is, how do we solve it?

The first thing to do is ensure that you have the required SDKs (System Development Kits) installed. These can be installed from the Xcode Tools disk image. To compile for 10.2, install the 10.2.8 SDK. To compile for 10.3, install the 10.3.9 SDK.

Then open the project. Once it has opened, select the project itself (the little Xcode document icon, with the name of the project; in this case, "iPodRip"):

Xcode - Groups & Files screenshot

Then "Get Info" on the project by pressing the "Command" + "i" keys.

A window with general information about the project will appear. Towards the bottom of there is a popup button with the title "Cross-Develop Using Target SDK". Here, you need to select which system you would like to build against. Since iPodRip is designed to run on 10.2 and above, we select the 10.2.8 SDK:

Xcode - Project Information

This setting causes Xcode to compile against a certain set of libraries (located under /Developer/SDKs/), rather than the default one for your current system.

Following that, you need to change a couple of settings for the application (or framework) to run correctly on the target system. These options are available under the "Build" tab. Select "All Configurations" from the "Configuration" popup button, to ensure that the settings you change apply to all of the existing build styles (Debug, Release, etc).

The "Deployment Target" needs to be changed in order for the application to be linked correctly. This is available about 1/3 of the way down. Simply select the minimum version you are compiling for. In iPodRip's case, it's 10.2:

Xcode - Project Build Settings

The final step is to set the version of GCC that we will be compiling with. Unfortunately, there is no entry for this by default (a stupid oversight, in my opinion), so it has to be added manually. This involves pressing the "+" button just below the table, which will create a new entry. Type in "GCC_VERSION" (no quotes), hit tab to go to the next column, and then type in "3.3″ (no quotes).

Xcode - Project Build Settings

(The SDKROOT setting there is set by the selection of an SDK in the previous tab.)

If you clean the build and recompile, the project will build and link against the chosen SDK/system and with GCC 3.3. Yay!

Some notes

You may get the following warning when compiling:

"ld: warning NEXT_ROOT environment variable ignored because -syslibroot specified"

It appears to be harmless, so can probably be safely ignored.

If you are compiling against any frameworks, they will have to be recompiled against the proper SDKs/targets and with the correct version of GCC. With iPodRip, we use 3 frameworks, and the settings had to be applied to each.

That's about it! Hopefully someone out there finds this useful.




Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Australia
Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Australia