Re: ? Weird DRAW widget VALUE ? [message #14141 is a reply to message #14135] |
Wed, 27 January 1999 00:00   |
Peter Cornelius
Messages: 6 Registered: January 1999
|
Junior Member |
|
|
Hi,
first of all: Thanks a lot for the support. I do appreciate
that very much.
David Foster <foster@bial1.ucsd.edu> wrote:
: First suggestion, get rid of common blocks! Store "state" information
: in a structure, create a pointer that points to it, and store this
: pointer as the UVALUE of the top-level-base widget.
Well, it was meant to be a quick and dirty hack... And now,
it seems to be ugly, too, from a programmers point of view 8-S
But I'm not a programmer,... but you're right, common blocks
are thorn bushes... you have to cut deep and watch about the
place for a while afterwards...
: I would guess that the order of parameters in your common-block
: is incorrect, as the string you are getting looks like it's
: associated with a button or label widget, and you're passing
: this widget to CW_DEFROI().
Why is order so important? DRAW_Comm contains widget ids, that's
correct, but only of my DRAW widgets... So far there isn't any
common block for button widgets ;-)==) (one could change that,
of course... >:-)==)).
In the main program, the buttons are created with:
MenuDesc173 = [ $
{ CW_PDMENU_S, 1, 'FILE' }, $ ; 0
[...]
{ CW_PDMENU_S, 1, 'DISPLAY' }, $ ; 23
[...]
{ CW_PDMENU_S, 1, 'Display Mode' }, $ ; 26
{ CW_PDMENU_S, 0, '2D/Profiles' }, $ ; 27
{ CW_PDMENU_S, 0, '2D/Click' }, $ ; 28
{ CW_PDMENU_S, 0, '3D' }, $ ; 29
{ CW_PDMENU_S, 2, 'ROI' }, $ ; 30
[...]
]
PDMENU298 = CW_PDMENU( BASE241, MenuDesc173, /RETURN_FULL_NAME, $
UVALUE='TopPullDown')
Typical wided output that is (please don't cry 8-S).
Regards,
Peter.
---
Peter Cornelius <pc***NOSPAM***@inr.fzk.de>
|
|
|