[Search for users]
[Overall Top Noters]
[List of all Conferences]
[Download this site]
Title: | DECWINDOWS 26-JAN-89 to 29-NOV-90 |
Notice: | See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit |
Moderator: | STAR::VATNE |
|
Created: | Mon Oct 30 1989 |
Last Modified: | Mon Dec 31 1990 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 3726 |
Total number of notes: | 19516 |
91.0. "Create_proc called twice" by INFACT::DATZMAN (Indianapolis Field Applications Center) Wed Feb 01 1989 10:49
I am experiencing a problem using callbacks. I am using UIL/DRM
with PL/I.
I have a popup attached dialog box that, has as children, several
listboxes. I use the "create" reason for the popup as well as the
nine listboxes that are children for the popup. I am using a
mechanism ala DECburger to "register" the widget id of the popup
and the listboxes. For example,
.
.
create = procedure create_proc(k_ext_observation);
The problem that arises (every time) is that when one of the listboxes
(e_ext_obs_list_box) is created and the create_proc procedure gets
called, is gets called twice. The first time the create_proc procedure
is called, the widget id is indeed that of the e_ext_obs_list_box
listbox. Then, a little later it gets called again, but this time
with a different widget id.
I have searched the UIL file that contains the definitions to make
sure that I was not passing the same integer value twice to
create_proc. I even used a value that I knew was not being used
just to make sure I didn't overlook something. I actually extended
my range for the widget ids and used the highedt value.
I also do not have any other procedures named "create_proc" so I
feel safe in saying that it is not some other procedure that is
mistakenly writing over my value.
I have created a work around for this. In the create_proc, I check
to see if the value in the global widget array that I am about to
store, is null or not. If there is a value in the array, I do not
store the new value. This seems to work but I don't like it.
I have posted as the first reply the relevant uil code for the popup
and the listbox that is getting waxed.
I don't know what I am doing wrong. This only happens for this
one listbox that is a child of the popup adb.
Also I am fetching this popup adb at application initialization
time like DECburger fetches its main window. My popup is not managed
at init time but is just fetched. Later in the application when
the user makes a selection, I just manage the popup.
If more information is needed just say so and I will comply. Any
help is much appreciated.
Dick
T.R | Title | User | Personal Name | Date | Lines |
---|
91.1 | UIL Code | INFACT::DATZMAN | Indianapolis Field Applications Center | Wed Feb 01 1989 10:53 | 105 |
|
Here is the UIL code fragment for the popup adb and the listbox.
! Begin External Exam Definitions
!*******************************************************************************
object ! The external exam box.
external_exam_box : popup_attached_db {
arguments {
title = k_external_exam_label_text;
style = dwtmodeless;
resize = DWT$C_RESIZE_SHRINK_WRAP;
y = 300;
units = DWT$C_PIXEL_UNITS;
width = 1020;
height = 500;
margin_width = 10;
take_focus = false;
};
controls {
!
! the value for label is the field that will appear on the menu.
! the value for simple_text is the variable to hold the user's imput
!
managed label e_dam_no_label; ! Dam Number:
managed simple_text e_dam_no;
!
managed label e_implantations_label; ! implantations
managed simple_text e_implantations;
!
managed label e_study_number_label; ! Study Number:
managed simple_text e_study_number;
managed label e_compound_number_label; ! Compound Number:
managed simple_text e_compound_number;
!
managed label e_conceptus_no_label; ! Conceptus No.:
managed simple_text e_conceptus_no;
!
managed label e_structure_label;
managed label e_location1_label;
managed label e_location2_label;
managed label e_location3_label;
managed label e_loc2_range_label;
managed label e_loc3_range_label;
managed label e_side_label;
managed label e_observation_label;
managed label e_ext_observation_label;
managed list_box e_ext_obs_list_box; ! external observations
managed list_box e_ext_structure_list_box;! structure
managed list_box e_ext_location1_list_box; !location 1
managed list_box e_ext_location2_list_box; !location 2
managed list_box e_ext_location3_list_box; !location 3
managed list_box e_ext_loc2_range_list_box;!location 2 range
managed list_box e_ext_loc3_range_list_box;!location 3 range
managed list_box e_ext_side_list_box; !side
managed list_box e_ext_observation_list_box;!observations
!
managed push_button e_enter_obs_button;
managed push_button e_continue_button;
! managed push_button e_reset_button;
! managed push_button e_cancel_button;
managed toggle_button e_skeletal_button;
managed toggle_button e_visceral_button;
managed separator e_separator;
};
callbacks {
create = procedure create_proc (k_ext_exam);
map = procedure map_proc(k_ext_exam);
};
};
.
. object definitions for the other 8 listboxes
.
.
object
e_ext_obs_list_box: exported list_box widget
{
arguments {
border_width = 2;
visible_items_count = 5;
width = 484;
margin_width = 0;
create_horizontal_scroll_bar = true;
x = 10;
y = 110;
};
callbacks {
create = procedure create_proc(k_ext_observation);
};
};
.
|