[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 |
611.0. "XtRealizeWidget access violates with ADA binding" by KERNEL::WOOD (Richard Wood - UK Workstation Support) Mon Apr 17 1989 08:50
Is there anybody out there who can see why this program gives an access
violation at the XtRealizeWidget call, I have a customer who can't
understand it and being a novice at both ADA and DECwindows, I can't
either.
Any help much appreciated !
Rich
===========================================================================
with x,dwt,system;
use x,dwt,system;
procedure test_harness is
w_top,
w_app : widget_type;
x_dpy : display_id_type;
x_fun : integer;
x_afn : address;
d_arg : arg_array_type(0..3);
d_argc : cardinal_type;
url : unsigned_longword_array (0..0) := (0 => 0);
argv: address_array (0..0) := ( 0 => address_zero);
argc : unsigned_longword := 0;
w_x, w_y, w_w, w_h : integer;
begin
Xt_Initialize (w_top, "TopLevel", "TopLevelClass",
url, 0, argc, argv );
xt_display (x_dpy, w_top);
Synchronize (x_fun, x_dpy, 1, x_afn);
w_x := 100;
w_y := 100;
w_w := 300;
w_h := 300;
vms_set_arg (w_x, d_arg, 0, c_nx & ascii.nul);
vms_set_arg (w_y, d_arg, 1, c_ny & ascii.nul);
vms_set_arg (w_w, d_arg, 2, c_nwidth & ascii.nul);
vms_set_arg (w_h, d_arg, 3, c_nheight & ascii.nul);
d_argc := d_arg'length;
Xt_App_Create_Shell (w_app, "testHarness", "TestHarness",
ApplicationShellWidgetClass,
x_dpy, d_arg, d_argc);
Xt_Realize_Widget (w_app);
Xt_Main_Loop;
end;
T.R | Title | User | Personal Name | Date | Lines |
---|
611.1 | A shell isn't enough | SDSVAX::SWEENEY | Wall Street is my beat | Mon Apr 17 1989 09:49 | 5 |
| Try putting something into the shell. I recall getting access
violations in similar cases. Remember shell widgets do not display
anything but act as an interface to the window manager. A typical child
of a shell is a main window, label, or pushbutton.
|
611.2 | Manage... | GSRC::WEST | I'm just visiting this planet. | Tue Apr 18 1989 11:34 | 6 |
| I believe you need to manage your app_shell_widget before you can
realize it.
-=> Jim <=-
|
611.3 | ApplicationsShells are not "managed" | SDSVAX::SWEENEY | Wall Street is my beat | Tue Apr 18 1989 13:01 | 16 |
| No, the information in .2 is incorrect. ApplicationShell's are the
toplevel shell of an application. They are designed _not_ to have
parents.
Recall that XtManageChild () adds a widget to its parent's list of
managed widgets. If a widget's parent is realized, the widget is
realized. If a widget's parent is not realized, the widget is not
realized.
Recall that XtRealizeWidget () creates the the X window and
XtAppCreateShell () does not have "parent" as one of its arguments.
XtRealizeWidget should be enough... but as I pointed out in .0, shells
with nothing inside them are anomolies, and one should not be surprised
that they don't work.
|
611.4 | sorry... | GSRC::WEST | I'm just visiting this planet. | Tue Apr 18 1989 15:42 | 16 |
| My mistake...I must have misplaced my brain...
There is something however I am not clear on.
When a call is made to XT_Initialize it in turn makes calls to
TOOLKIT INITIALIZE
DISPLAY INITIALIZE
APPLICATION CREATE SHELL and
CREATE APPLICATION CONTEXT
What was done in .0 was an XT_Initialize. The widget_id returned
was used in the display call to return the display_id. This display_id
was then used in the app_create_shell call. Is this really the way
the app_create_shell is to be used? The accvio comes from this call.
It never makes it to the realize call.
|
611.5 | Well spotted Bruce | COMICS::WOOD | Richard Wood - UK Workstation Support | Wed Apr 19 1989 13:49 | 5 |
|
Yep, your right, I think my brain's going too.
Access violation occurs in XtAppCreateShell and not XtRealizeWidget,
|