Re: XForms: More control of tabbed folders

Steve Lamont (
Wed, 8 Apr 98 09:23:49 PDT

# To subscribers of the xforms list from (Steve Lamont) :

> First, I need some sort of notification (like a callback)
> when folders are switched, *before* the current folder
> disappears. I have GL canvases on some folders, and I
> need to clean up and save some state before the GL context
> disappears.

You can set a cleanup callback with the fl_modify_canvas_prop()
function. The cleanup callback is called before the Canvas Window is

> The current folder callback mechanism seems to be called either
> just before or just after the new folder is shown - which is
> it? ...


> ... Also, the callback doesn't seem to be called if I do a
> fl_set_folder(). It seems that the callback is attached to
> clicking a (not currently active) folder tab, not to the function
> of actually showing a folder - is this correct?

This behavior is consistent with that of fl_set_button() and most
other "set" functions. If you want to trigger the callback you need
to call the function fl_call_object_callback().

> I really don't understand the distinction between fl_get_folder()
> and fl_get_active_folder().

fl_get_folder() returns the *last* active folder, not the current
one. fl_get_active_folder() does that.

> I find that the "feature" of objects without callbacks not causing
> fl_do_forms() to return to be a big nuisance and causes extra
> programming work. What's the rationale for this behavior?

Dunno. TC?

> Finally, if I wanted to implement functionallity similar to tabbed
> folders (i.e. get all of the objects in one form and add them to
> another), how would I go about doing that?

The folder mechanism basically creates a form and reparents it to a
canvas. I've been thinking of creating some sort of "scrolled"
composite object but haven't gotten terribly far with it other than
some "sketch" code.

To unsubscribe, send the message "unsubscribe" to or see
XForms Home Page:
List Archive: