Hi Patrick,
On Sun, Sep 13, 2015 at 02:03:55PM -0400, Patrick wrote:
I have been making good progress mixing GnuCOBOL and xforms. This
must seem strange but COBOL has excellent data description
facilities and I am happy with the outcome.
I've no problems with that as long as it works;-)
I have so far bypassed the built in callback handling and instead I
have been taking the returned pointer from fl_do_forms and using it
with pure COBOL event handling code.
Now that I am scaling up I have 40 forms in a tabfolder and button
events within the tabfolder are not being returned by fl_do_forms
only the switching of tabs is generating events.
Is there a way to tell xforms to propagate the event back up through
the tabfolder so I can still just use fl_do_forms?
Mmmm, the tabfolder code goes, as far as I can see, out of
its way to avoid having all these objects getting returned
by fl_do_forms(), at least if I can trust comments like
* For all the folders set a dummy form callback to prevent
* the contained objects from leaking thru to fl_do_forms
But perhaps that comment also hints at a solution (but I can't
tell for sure without a lot more of reading the code for the
tabfolder object): when you add a form to the tabfolder a
callback function is set for it that does nothing and, at
least according that comment, is just for keeping the object
events making it through to fl_do_forms(). You could try to
reset the callback _after_ you've added it to the tabfolder,
using
fl_set_form_callback( form, NULL, NULL );
That should have the effect that its objects get returned
by fl_do_forms(). But don't get angry with me if this doesn't
work or has unexpected side-effects;-) Let me know if it
works, in that case we could add that to the documentation.
Best regards, Jens