[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

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

852.0. "Pascal, Dwt, and XSync" by 22199::ONEAL () Tue May 30 1989 12:54

    The following program accvio's when I do the X$SYNC with the dpy value
    returned by either xt$display, or by dwt$get_display (return identical
    values).  It does not accvio with the value returned by x$open_display,
    but this value probably does not refer to the same data structures as
    the desired structure, i.e. that referenced by TopLevel.
    
    Problem:  Want to continue to use XT$INITIALIZE, but how to use X$SYNC
              following XT$INITIALIZE.
    
    Thanks,
    
    Tim
    
[INHERIT ('SYS$LIBRARY:DECW$DWTDEF','SYS$LIBRARY:DECW$XLIBDEF')] PROGRAM ICON (input, output);
VAR
	Argc		:Dwt$Cardinal := 0;
	TopLevel, DB	:Dwt$Widget;
	Arglist		:ARRAY [1..1] OF Dwt$Arg;
	dpy		:UNSIGNED;	(* the display variable *)
BEGIN
(*
	dpy := X$OPEN_DISPLAY();
*)
	TopLevel := XT$INITIALIZE ('TOP', 'helloworldclass', 0, 0, argc);
	DB := DWT$DIALOG_BOX_CREATE (TopLevel, 'DB', Arglist, 0);
	XT$MANAGE_CHILD (DB);
	XT$REALIZE_WIDGET (TopLevel);
	dpy := XT$DISPLAY(TopLevel);
	dpy := dwt$get_display(TopLevel);
	X$SYNC (dpy, 0);
	DWT$VMS_SET_ARG (0, Arglist, 0, DWT$C_NICON_STATE);
	XT$GET_VALUES (TopLevel, Arglist, 1);
	DWT$VMS_FREE_ARGNAMES (Arglist, 1);
END.

T.RTitleUserPersonal
Name
DateLines
852.1Check the bindings...AIRPRT::GRIERmjg's holistic computing agencySat Jun 03 1989 14:2316
   Check the Pascal bindings to X$SYNC in DECW$XLIBDEF.PAS that the parameters
are passed "appropriately".  I found a number of problems there back in FT,
but I've never looked at it closely.  (I just did, and it *looks* right, but
I don't have an up-to-date document about the bindings to check it against.)

   If it still ACCVIOs, try using "%REF" and "%IMMED" on the display parameter,
and also with the "discard" parameter.  It's possible that whoever wrote the
bindings for the VAX environment accidently assumed "by value" when the stuff
was supposed to be passed by reference.

   And, if all else fails, use the MIT C bindings from Pascal.  That's the only
way I could get X$LOOKUP_STRING to work.


					-mjg