Tewha Links and writings on software development, mostly for iPhone and Mac OS X.


Java on Mac: Going downhill or catching up with native?

I admit I'm no Java expert, but this doesn't sound like such a bad turn of events to me. In fact, it sounds pretty decent.

Apple's Technical Note TN2196 discusses the new control styles available within J2SE 5.0 on Mac OS X 10.5:

J2SE 5.0 on Mac OS X 10.5 gives Java applications access to a wide range of native control styles. These new runtime client properties allow your Java application to look and feel more like Cocoa applications than ever, while still enjoying the portability benefits of a pure Java codebase.

Interestingly, one of the complains about Mac OS X Java was:

Apparently Apple decided it wasn't important to visually distinguish the two types of dialogs by using different icons... Or even using icons that made contextual sense for that matter.

That'd be awful. Except that, well, that's what native applications do, too, since Mac OS X 10.3. See Tech Note #1378 (from 2005), which explains this change in part:

The rationale for that decision is simple: on Mac OS X, all windows of all launched applications are interleaved. Thus, when an alert pops up, there is no easy way for the user to know which application issued the alert. Replacing the standard icons by the application icon gives a visual clue to the user who can then identify the source. Since the NoteAlert and the StopAlert were the most commonly used alerts, they were changed, but the CautionAlert, rarely used, was unchanged.

So, is there a way to give Java applications custom icons? What, specifically, is wrong with Leopard's Java anyway?

Ugly + opaque = still ugly.

Daring Fireball links to an Apple support document:

Some graphics cards, such as an NVIDIA GeForce FX 5200, may not have the necessary OpenGL capabilities to display a translucent menu bar even though they are compatible with Core Image. Those cards should render most effects, but not the translucent menu bar.

John Gruber muses:

So the irony is that you get a better-looking menu bar with a crappier video card.

Here's the view from Tiger, just for review:

Tiger Menu Bar

And here it is from Leopard on my PowerBook G4 (which doesn't support translucency):

Leopard Menu Bar (PowerBook)

Here it is from my Core Solo mini:

Leopard Menu Bar (Intel Mini)

Is the Leopard menu bar really more attractive without the translucency? I'd say it's quite debatable. The opaque one is very muddy looking, especially on a PowerBook with a so-so backlight. There's really nothing to love about it. On the other hand, it's possible to find the translucent one attractive. I don't, but someone else might.

Despite my initial thoughts to the contrary, the menu bar has grown on me a little. It's the 3d dock that I passionately hate.

Both Leopard menu bar variations are the ugly stepsisters of Tiger, so this really doesn't matter. It isn't just the translucency that sucks, it's the whole Leopard menu bar.1 It's enough to make me consider something like ShapeShifter, and I passionately hate APE.

John goes on:

It’d be the tip of the year if there were a hidden defaults preference to use the no-translucency menu bar no matter what.

If there is one, it definitely isn't in the Finder. I searched that one for strings. But, I suppose, it probably wouldn't be in the Finder? Where exactly would it be? It isn't usually that hard to find defaults strings in executables. And if it's built using XML that should be even easier.

  1. Of course, Tiger's menu bar with its subtle racing stripe was also a step backwards from Panther's. []

New in Leopard: Global Login Items?

Not a lot of details yet, but apparently Mac OS X 10.5 supports Global Login Items. This would be a nice thing to have more information on, as I can imagine needing to remove these.

From Apple's technote on Daemons and Agents:

A global login item is a login item that is launched when any user logs in. Installing a global login item is roughly equivalent to installing that login item for all users on the system: every time a user logs in, loginwindow launches that user's login items and all global login items.

In Mac OS X 10.5 and later you can install a global login item using the shared file lists interface to Launch Services.

I'm getting the feeling from that description that there's no UI for managing these. There's also the possibility that some doc writer made the whole thing up. Anyone know more?

Leopard docks

Turn off glass effect for the dock:

defaults write com.apple.dock no-glass -boolean YES; killall Dock

Turn on glass effect for the dock:

defaults write com.apple.dock no-glass -boolean NO; killall Dock

Want something else for the dock?

Most (all?) of these work by replacing the glass graphics.

High contrast dock

Sky and wood dock

Danish and ice dock

Lots of colored docks

(I saw a really good one on the weekend but can't find it now.)

Update: It was inevitable that something like leoparddocks.com would appear. Enjoy!

Best quote yet on Leopard's translucent menu bar

Best quote yet on Leopard's translucent menu bar:

If anyone happens to meet the UI designer who thought a transparent menu bar was a good idea, please slap them once for every Leopard user (two million slaps and counting...)

To be fair, some of those two million users probably have hardware that doesn't support the translucent menu bar. Their menu bar is just a really ugly muddy grey.

Come to think of it, slap him for those users too.

Mac OS X runs deleted applications

I filed this as radar #5574036, but it seems significant to share:

Imagine that you trash an application because of a security flaw. Say, it handles the URL type foofoo, and is proven to be a security risk. But the developer won't fix it (or hasn't fixed it yet), so you've removed the application from your hard drive to keep yourself safe.

It doesn't work that way — you're not safe. Time machine has made a copy in your time machine backup that Mac OS X will cheerfully launch without a warning.

Steps to reproduce:

  1. Have existing, up-to-date Time Machine backups.
  2. Delete a protocol handler.
  3. Visit a web site that uses that protocol.

Expected results:

  • Mac OS X will respect that the application has been removed.

Actual results:

  • Mac OS X will hand it off to the application on the Time Machine backup volume.

Update: This seems to also be true of standard Finder document bindings. I tried double clicking a TextWrangler document after deleting TextWrangler and it cheerfully launched out of the Time Machine backup. Not that I think there's anything wrong with TextWrangler; it was just a program I knew I could delete safely (and restore after).

Update #2: It was pointed out to me on the Macworld Forums by Rob Griffiths that there is a way to permanently delete a file from all backups. You need to use the context menu within time machine to delete all backups of a file. This means there's a workaround, but it's still a problem that Mac OS X launches applications from the backup folder without even a warning.

Update #3: Apparently, some don't understand why this is a bug. Let me give you a simple example: You find out Adium (for example) has an available exploit that the developers haven't patched yet. You remove Adium, but it continues to exist in your backup. You visit a web page that activates the Adium bug, and Adium is launched from your backup. That you can launch Adium from your backup is not a bug. That Mac OS X will do so automatically without confirmation is a bug. The backup should be considered a vault for the user, not Launch Services.

Stacks: An unmitigated disaster

Subtitle: The Ugliest Thing You Have Ever Seen in the Mac GUI

I think I can get off my horse now. This says everything I want to on the subject, only much more elegantly. And with, like, pictures and stuff.

/me is happy

I haven't seen this mentioned anywhere at all, but iChat now does something with /me:

(Thanks for the excellent demo, mx.)

Things I don't like about Leopard

There's a lot of things I like about Leopard, and I plan on writing about them soon. However, I found it easier to write about the things I don't like. This is probably mostly because there are so few of them.

  • You can change a window's view settings, and you can make them the default, but there's no way to say "I don't like this, just use the defaults for this window." I really wish Apple would stop taking this feature away. I think this is the third time they've done so.
  • Finder doesn't bother remembering what view you're in. Start in a folder in icon view, and open a subfolder of it. Switch to list view. Click the back view. You're in your original folder, but you're still in list view. Why? I can't imagine anyone would ever want this. Well, maybe they would with cover flow...
  • Which directly ties into this: Cover flow shouldn't be an additional view, it should be an addition to any existing view. Cover flow is really just taking the bottom part of the window and generating previews for it. Why shouldn't this work in icon view or (especially) column view?
  • Stacks on the dock are a complete train wreck. I hope there's a defaults write to disable this.
  • Safari's Find command? Sucks. Try again, Apple.

No search in Leopard Dev Center

Apple hasn't deigned to include search functions in their Leopard Dev Center.

Without an ADC account, you won't be able to log in. And without logging in, you'll see only the light version of the site. But the only difference between the light version of the site and the one developers see is that developers get functioning hyperlinks.