Solipsism Gradient

Rainer Brockerhoff’s blog

Browsing Posts tagged RBSplitView

Whew!

No comments

After some very tense days, I’m up and running on the new hosting provider: DreamHost. Prices are good, support seems to be fast and quite good, and there’s lots of options. More if you buy before year’s end; if you do so, be sure to mention my domain name as the referrer, or click through from the link above; I’ll get a modest commission.

The Santy worm, now apparently renamed Spyki, is still pounding the servers in ever-new combinations. Still, the security hole remains closed and I have added some new stuff to avoid having the server respond to the worm, which should ease the load quite a bit. If you have seen the site responding very slowly or even not at all during the last two days, it was a hardware problem and should be fixed by now.

Some other things are still shaking out but everything should return to normal on January 1st. In particular, Bill Bumgarner has tested RBSplitView and made some interesting suggestions; so have several other developers. It seems I should put up a new “source code” page with that and other goodies, so that will be my first priority.

Re: Whew!

No comments

Rainer Brockerhoff wrote:

… In particular, Bill Bumgarner has tested RBSplitView and made some interesting suggestions; so have several other developers. It seems I should put up a new “source code” page with that and other goodies, so that will be my first priority.

While I’m working on the source code page, Erik Barzeski of Freshly Squeezed Software wrote on his NSLog() that they’ll be using RBSplitView in their new version of PulpFiction:

Total time to convert from our hacked up NSSplitView (which can be collapsed, stores sizes, has minimum sizes before collapsing, etc.) to RBSplitView and to add the feature I just mentioned: about ten hours. Coded, bug fixed, and tested.

Now that’s the sort of thing I like to read… icon_biggrin.gif

Also, Steve Gehrman, the mastermind behind CocoaTech, will be using RBSplitView in the forthcoming version of Path Finder. My thanks to all who’ve helped with suggestions and debugging!

Meanwhile, I’ve belatedly noticed that my last post below was #1000, and that this weblog’s second anniversary has passed unnoticed on last Sept. 21st. Not bad…

jason wrote:

Just discovered your new-and-improved split view. VERY COOL!

Thanks for sharing it with the community.

Thanks, feedback so far has been very positive.

jason wrote:

I was wondering if might have some pointers on modifying the framework to incorporate rearranging the subviews via drag-and-drop. This is cool feature of Eclipse and seems to a natural enhancement to your objects.

How much effort do you think this would take?

Very interesting suggestion, I hadn’t thought of that – I’m not a Eclipse user.

The user interface would need some place where you can “grab” a subview to drag it over; the rearrangement itself shouldn’t be difficult. Offhand I can’t think of an unobtrusive way to do that, however. If the subviews had title bars – like the columns in NSTableViews – it might be possible. Hm…

enhancing RBSplitView

No comments

Posted by jason:
Just discovered your new-and-improved split view. VERY COOL!

Thanks for sharing it with the community.

I was wondering if might have some pointers on modifying the framework to incorporate rearranging the subviews via drag-and-drop. This is cool feature of Eclipse and seems to a natural enhancement to your objects.

How much effort do you think this would take?

thanks,

– jason

My RBSplitView seems now to be working well – I killed all known bugs in the implementation itself, and nearly all in the Interface Builder palette. There’s a sample application and documentation, and some developers seem to be interested in using it in production code. So, unless a serious bug is discovered in the next few days, I’ll call this version 1.0 and make a separate “Source Code” page here.

Thanks to Steve Gehrman of CocoaTech for helping with debugging and offering many suggestions. I also looked at dozens of code examples of IBPalettes and NSSplitView subclasses and learned a little from every one, although I didn’t copy any actual code.

Now at last – hopefully – we’ll return to our regular programming… icon_wink.gif

Rainer Brockerhoff wrote:

…but seems to working quite well.

Hah. That was somewhat premature… I tried to put some new features into my RBSplitView, and found several bugs in the process. The main addition – an option to force subviews to always have a dimension multiple of some integer – failed after several days of beating all available neurons against it. It’s just too complex and I have urgent things to do elsewhere.

So, if you’re interested, you can download it from the above link, and please let me know if you find something wrong – or even if it works spectacularly well. Meanwhile, I plan to resume work on XRay, using the new view, of course, early next week.

Fast update: autosaving subview states is now working in the RBSplitView, and I fixed a couple of bugs. It proved harder to do than I supposed, but seems to working quite well.

I wrote before the trip:
Rainer Brockerhoff wrote:

Time for another update on XRay 2.0.

…The main tool for the user to adapt the interface to personal needs will be the split view paradigm. Vertically, the window will be divided into several splits, most of which will have subsplits.

…So much for trying to fix NSSplitView. After examining and discarding some other fixes floating around on the net, I decided to reimplement NSSplitView from the ground up as a NSView subclass. This, in turn, launched me into writing an Interface Builder palette so I could set up my window as usual.

…Still, I haven’t given up and I’m now deciding whether I should build my window entirely programmatically or spend a “Support Incident” at Apple ADC to get an official workaround… stay tuned.

As I took my old iBook on the trip, I was able to devote some time every day – after the “official” touristy duties – to reimplementing the split view. (The official class name is now “RBSplitView”, by the way.)

The view implementation itself was actually quite straightforward, although complex; it was the IBPalette that took most of the time. It took quite a bit of testing and checking unsupported APIs to find out a way that works for most of the expected Interface Builder actions, and in the end I managed to do it all by using only the “normal” APIs.

If you’re interested, the current version of RBSplitView and the associated IBPalette will always be downloadable here. Xcode 1.5 running on Panther is required.

Highlights:

  • Full reimplementation of split view, not a subclass
  • Not a 100% drop-in replacement for NSSplitView though
  • Uses container subviews for each split
  • Allows easy nesting of split views with automatic 4-way thumbs
  • Source and IBPalette available under modified BSD license.

Still to do:

  • Autosaving of subview state
  • Separate documentation
  • 100% glitch-free working in Interface Builder

Comments will be extremely welcome!

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