[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
widget_control and group_leader
- Subject: widget_control and group_leader
- From: nrk5(at)cornell.edu
- Date: Fri, 22 Dec 2000 22:06:48 GMT
- Newsgroups: comp.lang.idl-pvwave
- Organization: Deja.com
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:22736
Lets say I have two widgets, A and B. There are two links between the
1) A.top and B.top are eachother's groupleaders, and
2) A uses common blocks and has a variable 'foreign_event_handler' that
is set by B.
So, when an event is generated by A and the 'Use Foreign Event Handler'
option is set in the widget, events generated by A go to whatever B set
widget_control, id, event_pro=foreign_event_handler
Things to note:
1) A can't be modified at all. Nothing added or changed. (ie. no more
2) B is an object widget and needs to set its structure variables to
variables in the events generated by A.
3) In B::init, B.top has a uvalue of self.
The question is, how can I use foreign_event_handler to get to 'B self'
from an event generated by A? My thought was:
PRO foreign_event_handler, eventFromA
widget_control, eventFromA.top, get_Group_Leader = BtopID
widget_control, BtopID, get_Uvalue = objectReferenceToB
And now I would be in business. But, is there such as thing as
get_group_leader? Is there another way to do this?
I know that not being able to change A doesn't help, else there would be
a million solutions, but its not my program. The only minor change I
might be able to make is to create a generic variable in A's common
block that could be set to whatever, but then I would have to define it
as a string or a long, and that would restrict its use.
Sent via Deja.com