Re: Child widget group leader of its own TLB? [message #9455 is a reply to message #9405] |
Fri, 04 July 1997 00:00   |
nhbkmich
Messages: 8 Registered: January 1996
|
Junior Member |
|
|
David Foster (foster@bial1.ucsd.edu) wrote:
: Michael -
: I think you may be confused about the concept of GROUP_LEADER and
: it's effect on widget destruction. When you create a widget heirarchy,
: any and all widgets that are "below" the TLB will be destroyed
: automatically when you destroy the TLB. By "below" I mean that you can
: trace back from a widget up through the heirarchy and get to the
: TLB. So there is no need for a cascade as you mention above.
In the actual case, there is some need. The widget application passes
the Id of a (child) text widget outside, rather than its top level Id.
The reason is, that I want to be able to manipulate this text widget from
outside in more ways than possible by FUNC_GET_VALUE and PRO_SET_VALUE.
Things like dis- or enabling editing, dis- or enabling events created by
the text widget or establishing a separate event handler.
But one possible manipulation is also destroying the text widget. In
this case, there would only remain a kind of ruin of a mini window frame
containing meaningless buttons and labels.
I intended the whole application to quit in such a situation as if "Done"
had been pressed.
: The GROUP_LEADER keyword is intended for situations where you have
: one widget program up and running, and then you with to call another
: widget (a program or a modal popup) from within that first program.
: In the second program you specify the TLB of the first widget as the
: GROUP_LEADER. When you do this, the second widget will be destroyed
: if the first is destroyed. You can have a whole series of programs
: up, and have them all destroyed at once. This is also useful when
: a program has several (or many!) widgets that all must
: go when the parent widget is destroyed.
I know, this is the most common use of widget groups. But is it restricted
to this use? Neither the online help nor the printed manuals state something
like that. Furthermore, wouldn't this imply, that only top level bases can
reasonably be group leaders as well as _group members_? If so, why do all
widget creation functions, including WIDGET_TEXT, WIDGET_BUTTON, WIDGET_LABEL
etc., which can never create top level widgets, accept the GROUP_LEADER
keyword?
: Hope this helps.
Yes it does. Maybe my goal is a bit too exotic. But I'm not yet really
convinced :-)
Michael
--
************************************************************ *****************
Michael Steffens Institut f. Meteorologie u. Klimatologie
Tel.: +49-511-7624413 Universitaet Hannover
email: Michael.Steffens@mbox.muk.uni-hannover.de Herrenhaeuser Str. 2
steffens@muk.uni-hannover.de D-30419 Hannover
PGP fingerprint = FA BE 6C 1C F6 C3 EC 33 DD 42 6B 7F DE CF 84 B8
|
|
|