Dockable Panes

Richard Gaskin ambassador at fourthworld.com
Sun Dec 30 11:50:18 EST 2012


Dockable panes are a deep subject.  I have a need for them in an upgrade 
on the horizon for one of the projects I manage, and thus far my 
explorations have been challenging at best.

One of those challenges is deciding how to handle the empty space left 
over from a removed pane.  Should it be split equally among neighboring 
panes, or is one of those panes more important so that it should fill 
that space?  In the app I'm working one there are some circumstances 
where each option may be best, but for usability I should probably pick 
one and use it consistently.

Another challenge is providing feedback to the user during the drag.  In 
some systems the panes update in real time during the drag, but with a 
good many complex groups this can be too intensive to do in LiveCode. So 
at the moment I'm exploring proxies, outlines to indicate how the panes 
will be resized as the drag happens.  But even that is not without its 
challenges, since outlines alone don't always adequately communicate 
which pane is being indicated.

Then there's the question of how a given pane should be split when 
another is dropped into it.  Near the edges the decision is usually 
clear, but if you drop toward the center it's not always straightforward 
to decide whether to split horizontally or vertically.

At the moment I'm considering abandoning truly dockable panes altogether 
in favor of a set of preset pane layouts the user can select from a 
gallery.   This is MUCH easier to code, and simpler for the user to be 
able to anticipate how it works.

I'll probably get back to experimenting with dockable panes later on, 
and the whole thing is interesting enough to me that I wouldn't mind if 
you want to continue this discussion via email or phone.  Drop me a note 
if you do.  Who knows, we may be able to come up with an affordable 
method for this which lends itself to a generalized framework that can 
be used in a wide range of apps.


PS: If you haven't seen Pencil it's quite inspiring for dockable panes:
<http://www.pencil-animation.org/>

That app has one advantage mine doesn't, though:  it maintains one main 
pane in the center, so the docking decisions are limited to what happens 
at the edges.

Still, it's one of the smoothest configurable pane implementations I've 
seen, very enjoyable to play with.

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  Follow me on Twitter:  http://twitter.com/FourthWorldSys




More information about the use-livecode mailing list