On Sat, Mar 13, 2004 at 04:11:54PM -0500, Tony Chang wrote:
> By window, I assume you mean frame. Anyway, I use the following to cycle
> through all my frames. It tries to go down first, then if there's
> nothing below the frame, it goes to the top of whatever is to the right.
> If there's nothing to the right, it jumps to the top left.
It should ben oted that what the functions used here do depend on the
activity history of frames. WIonWS.goto_dir, WIonWS.farthest and
WIonWS.next_to (which the other functions -- that have been removed for
Ion3 to simplify the API -- use) use the most recently active frame that
matches the request. If you want a more deterministic browsing order,
you'll have to use the more primitive WIonWS.split_of, WWsSplit.br, .tl,
.parent, .is_horizontal and .is_vertical functions to traverse the split
tree. Of course, unless you simply traverse the frames in tree order
(which may not be at all close to left->right, top->down depending on
the layout and creation order of splits), you'll have to decide when a
frame is, say, right of one frame and not the frame below (whatever that
would be) it.
Also note that
Class.method(obj, params)
can more conveniently be written as
obj:method(params)
But either way goes as Ion doesn't do dynamic functions on the Lua side.
--
Tuomo