Solipsism Gradient

Rainer Brockerhoff’s blog

Well, this time it looks like it’s done. All known bugs are gone. I think all weird splitview behaviors in Apple’s applications can now be easily duplicated.

I also added the MIT License, in order to have an OSI-approved license for it. And I’ve entered it into the Apple Design Awards, too. The “Best Use of Open Source” category seemed the best fit, although I’m not using but creating open source here… still, let’s see what happens.

Same place as usual. I really hope this will be stable for some time, at least until after WWDC…

An interesting thing happened while doing this version. (The following discussion will make no sense unless you’re familiar with RBSplitView.)

I have an adjustSubviews method call which does all the heavy lifting, computing the new positions and sizes for all subviews. This worked fine until I saw the need to (sometimes) have a specific subview stay the same size whenever the window was resized. In other words, I needed an adjustSubviewsExcepting: method.

At first I saw no easy way to do this, but then I hit upon a simple trick; I would temporarily set that subview’s minimum and maximum dimensions to the current dimension, call adjustSubviews, then put the original limits back. This was way back in version 1.0.2.

All seemed to work fine until I received a bug report that this could cause the subview to be collapsed in certain circumstances. So this time I tried several ways to prevent this from happening; the code inside adjustSubviewsExcepting: grew ever more large and cumbersome, and nothing appeared to work in all cases.

Then the solution appeared in my sleep (as often happens). The thing was to make adjustSubviewsExcepting: the general case, and adjustSubviews the exception! I already looped twice over the subviews; first, to try to accomodate them just by resizing and limiting some to their constraints, then again if that didn’t work, to collapse or expand some until all constraints were satisfied.

So I added a few lines to double this double loop; once while holding the excepted subview constant (if there was any), then once again while allowing it to resize if a solution was not reached. This proved to work quite well, and I was already near to publishing until I again found a circumstance where it didn’t work.

Turned out my initial implementation was faulty in that 3 passes (not 2!) were needed to find a viable solution. So the algorithm now loops 3 times if there is no excepted subview and 6 if there isn’t. By now, after refactoring the inner loop several times, no serious speed penalty is incurred and everything works much more smoothly.

Moral: refactoring should also consider what is the rule and what the exception…

Re: Tiger, hm

No comments

Whew! I finally succeeded in downloading and installing 8A428, the “Golden Master” build of Tiger (Mac OS X 10.4). So far everything works great. And AAPL also closed up at $37.24… I’m happy.

I was just looking at my user’s version stats – that is, the versions recorded when XRay and Zingg! check for updates – and I’m amazed. Tiger came out officially on April 29th, yet April closed with a 10% adoption rate! And for May so far, late on May 6th, 52% of my users are already running Tiger!

For the record, 4% are still on Jaguar, 35% on 10.3.9, and 9% on other Panther versions. I thought adoption rates would be high, but this is beyond all expectations. It quite confirms my decision to make XRay 2.0 Tiger-only.

Also, RBSplitView 1.1.1 is in final testing and should be out tonight or tomorrow. I’m just polishing the docs right now, so look for it later…

Tiger, hm

No comments

All cat metaphors seem to have been overused already, so I’ll spare you. icon_wink.gif

If you’re developing for Mac OS X 10.4 (Tiger), or just interested in more technical details, John Siracusa’s review is essential reading. He just about convinced me to make XRay 2 a Tiger-only application. More details on that as the ideas develop… in the meantime, I’ll probably have to do a 1.1.1 bug-fix release on the current version.

Talking of bug-fix releases, RBSplitView 1.1.1 is also in the works… if you have any suggestion or bug reports, send them in soonest.

Erika Fuchs died recently at 98. She was a major influence on contemporary German culture, mainly by translating Walt Disney’s comics into German from 1951 (the year I was born!) to 1988.

Her translations were original, literary, funny and often memorable; it’s common to hear her phrases quoted in everyday conversation in any German household. They often contained subtle parodies of German classic literature and poetry, as well as ingenious wordplay. I taught myself to read on her work, so she was a huge influence on me. When I finally found some of those comics in the original English, it was a huge letdown. This is certainly a case where the translation far surpasses the original…

Thanks to the Schockwellenreiter for the link.

Golly gee…

No comments

Says this article:

A WEST NYACK, N.Y. MAN was found dead at his computer apparently the victim of trying to keep up with too many professional forums. Childress H. Wanamaker, 54, an account executive at a New York-based new media company, died of starvation according to the West Nyack coroner’s office. Wanamaker’s emaciated body was found by Loraine, his wife of 26 years, who told MediaPost she had been bringing her husband meals on plastic trays for weeks, but that he never took the time to eat them.

“He was glued to his computer 24/7,” she said tearfully. “He was so afraid he was going to miss an opportunity to contribute a comment or start a discussion, that he just stopped eating.”

In what must be a record, Wanamaker was linked into to over 15,250 other community members, many of whom he exchanged notes with daily. He also contributed to 375 blogs and was expected to start an online column about the impact of interactive communications on health, when he died.

I was quite believing this until this last sentence. Hm.

Still, I’d better prune some of the 244 items off my RSS subscription list. Better safe than sorry!

By the way, Dan Wood just said some nice words about RBSplitView on his own weblog. Thanks, Dan!

RBSplitView 1.1

No comments

Well, it took over a month, but version 1.1 of RBSplitView is now out.

Originally I was calling it 1.0.5, but several people made so many good feature requests it became clear that 1.1 would be more appropriate. Special thanks to Dan Wood, Steve Gehrman and Brad Miller for their input and help with debugging.

When I began coding on XRay 2 some months ago, I ran into severe limitations with Cocoa’s NSSplitView. After a couple of frustrating weeks to make it behave like it should, I began looking for alternatives, to no avail; so I started coding my own version.

Then, as I realized that many other people were having similar problems, and that numerous Apple applications also seemed to have their own handrolled extensions to NSSplitView, I decided to publish my source. It has been a great learning experience.

With my recent decision to attend WWDC, I think the time has come to stop fiddling around with RBSplitView and return to XRay 2, in order to have a working alpha to bug the Apple engineers with. This will be fun!

Photos licensed by Creative Commons license. Unless otherwise noted, content © 2002-2025 by Rainer Brockerhoff. Iravan child theme by Rainer Brockerhoff, based on Arjuna-X, a WordPress Theme by SRS Solutions. jQuery UI based on Aristo.