[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 |
1419.0. "XT$APP_CREATE_SHELL ???" by EWBV37::HIME (I hate you FORTRAN !!) Mon Sep 11 1989 21:08
I have a customer who is tring to use the XT$APP_CREATE_SHELL with FORTRAN
and he is getting an ACCVIO.
I found out some informations about this problem in the QAR list.
But it does not clear up the problem.
Is this a known bug or restriction ?
The following program reproduces his problem.
Is there any mistakes in my program ?
Could any one please let me know how to call it from FORTRAN ?
-Toru.
$ run SAMPLE1
%SYSTEM-F-ACCVIO, access violation, reason mask=01, virtual address=5A1490D6, P
C
=000F94AA, PSL=03C00000
%TRACE-F-TRACEBACK, symbolic stack dump follows
module name routine name line rel PC abs PC
000F94AA 000F94AA
000F970E 000F970E
000FEC6D 000FEC6D
000FF079 000FF079
000DA5A8 000DA5A8
SAMPLE1 SAMPLE1 14154 000000B3 00000EB3
PROGRAM SAMPLE1
IMPLICIT NONE
INCLUDE '($DSCDEF)'
INCLUDE 'SYS$LIBRARY:DECW$DWTDEF'
INCLUDE 'SYS$LIBRARY:DECW$XLIBDEF'
STRUCTURE /DESCRIPTOR/
INTEGER*2 LENGTH
BYTE DTYPE
BYTE CLASS
INTEGER*4 POINTER
END STRUCTURE
RECORD /DESCRIPTOR/ HIERARCHY_FILE_DESCR
CHARACTER*(*) HIERARCHY_FILE_NAME
PARAMETER (HIERARCHY_FILE_NAME='T.UID')
INTEGER*4 DB_FILENAME_VEC(0:0)
INTEGER*4 DB_FILENAME_NUM /1/
INTEGER*4 s_DRMHierarchy
INTEGER*4 DUMMY_CLASS
EXTERNAL ACTIVATE_PROC
EXTERNAL CREATE_PROC
EXTERNAL APPLICATIONSHELLWIDGETCLASS
CHARACTER*(*) ACTIVATE_PROC_N
PARAMETER (ACTIVATE_PROC_N = 'activate_proc'//CHAR(0))
CHARACTER*(*) CREATE_PROC_N
PARAMETER (CREATE_PROC_N = 'create_proc'//CHAR(0))
RECORD /DWT$DRMREG_ARG/ REGLIST(0:1)
INTEGER*4 REGLIST_NUM /2/
INTEGER*4 TOPLEVEL,MIDDLE
INTEGER*4 COMMAND_WINDOW,MAIN_WINDOW
INTEGER*4 ARGC /0/
INTEGER*4 HIERARCHY_STATUS
INTEGER*4 REGISTER_STATUS
INTEGER*4 FETCH_STATUS
INTEGER*4 LSTATUS
INTEGER*4 APP_CONTEXT
INTEGER*4 DISPLAY,disp
INTEGER*4 COUNT
!
RECORD /DWT$ARG/ ARGLIST(0:1)
!
HIERARCHY_FILE_DESCR.LENGTH = LEN(HIERARCHY_FILE_NAME)
HIERARCHY_FILE_DESCR.DTYPE = DSC$K_DTYPE_T
HIERARCHY_FILE_DESCR.CLASS = DSC$K_CLASS_S
HIERARCHY_FILE_DESCR.POINTER = %LOC(HIERARCHY_FILE_NAME)
DB_FILENAME_VEC(0) = %LOC(HIERARCHY_FILE_DESCR)
REGLIST(0).DWT$A_DRMR_NAME = %LOC(ACTIVATE_PROC_N)
REGLIST(0).DWT$L_DRMR_VALUE = %LOC(ACTIVATE_PROC)
REGLIST(1).DWT$A_DRMR_NAME = %LOC(CREATE_PROC_N)
REGLIST(1).DWT$L_DRMR_VALUE = %LOC(CREATE_PROC)
CALL DWT$INITIALIZE_DRM
CALL XT$TOOLKIT_INITIALIZE()
APP_CONTEXT = XT$CREATE_APPLICATION_CONTEXT()
DISPLAY = XT$OPEN_DISPLAY(APP_CONTEXT,'EWBV37::0.0',
* 'TEST',
* 'TEST',
* ARGLIST,0,
* ARGC,%VAL(0))
CALL DWT$VMS_SET_ARG (
* 100,
* ARGLIST,
* 0,
* DWT$C_NX)
CALL DWT$VMS_SET_ARG (
* 100,
* ARGLIST,
* 1,
* DWT$C_NY)
TOPLEVEL = XT$APP_CREATE_SHELL('TEST',
* 'TEST',
* APPLICATIONSHELLWIDGETCLASS,
* DISPLAY,
* ARGLIST,2)
HIERARCHY_STATUS = DWT$OPEN_HIERARCHY(
* DB_FILENAME_NUM,
* DB_FILENAME_VEC,
* %VAL(0),
* s_DRMHierarchy)
IF (HIERARCHY_STATUS .NE. DWT$C_DRM_SUCCESS) THEN
TYPE *,'Can''t open hierarchy, status=',HIERARCHY_STATUS
STOP
END IF
REGISTER_STATUS = DWT$REGISTER_DRM_NAMES(
* REGLIST,
* REGLIST_NUM)
IF (REGISTER_STATUS .NE. DWT$C_DRM_SUCCESS) THEN
TYPE *,'Can''t register callback, status=',REGISTER_STATUS
STOP
END IF
FETCH_STATUS = DWT$FETCH_WIDGET(
* %VAL(s_DRMHierarchy),
* 'main',
* TOPLEVEL,
* MAIN_WINDOW,
* DUMMY_CLASS)
IF (FETCH_STATUS .NE. DWT$C_DRM_SUCCESS) THEN
TYPE *,'Can''t fetch MAIN WINDOW, status=',FETCH_STATUS
STOP
END IF
CALL XT$MANAGE_CHILD(MAIN_WINDOW)
CALL XT$REALIZE_WIDGET(TOPLEVEL)
CALL XT$APP_MAIN_LOOP(APP_CONTEXT)
END
!---------------------------------------------------------------------------
!
!
SUBROUTINE ACTIVATE_PROC(W,TAG,REASON)
CALL SYS$EXIT(%VAL(1))
RETURN
END
SUBROUTINE CREATE_PROC(W,TAG,REASON)
RETURN
END
module sample1
version = 'v1.0'
names = case_sensitive
include file 'decw$include:DwtAppl.uil';
value
popup : compound_string('popup!!');
procedure
create_proc (integer);
activate_proc (integer);
object
main : dialog_box {
arguments {
width = 100;
height = 100;
};
controls {
push_button b1;
! popup_dialog_box command_box;
};
};
b1 : push_button {
arguments {
label_label = popup;
};
callbacks {
activate = procedure activate_proc(1);
};
};
! command_box : popup_dialog_box {
command_box : dialog_box {
arguments {
x = 100;
y = 100;
width = 700;
height = 100;
! style = DwtModal;
! style = DwtModeless;
};
callbacks {
create = procedure create_proc(1);
};
};
end module;
T.R | Title | User | Personal Name | Date | Lines |
---|
1419.1 | Some progress | QUARK::LIONEL | Free advice is worth every cent | Tue Sep 12 1989 14:36 | 21 |
| I tried this under VMS X5.3 (DECwindows V2), and get somewhat different
errors. The first problem I see is that APP_CONTEXT needs to be passed
by immediate value to XT$OPEN_DISPLAY and, I think, XT$APP_MAIN_LOOP.
This is an error in the documentation (and VAX bindings).
However, when I make these changes, I then get the error:
X Toolkit Error: Error in XMultiplexInput
%DWT-F-DWTABORT, xtoolkit fatal error
I don't know how to proceed. I can tell you that I see no evidence that
your code for calling XT$APP_CREATE_SHELL has any problems, as the program
gets all the way to the main loop before the error.
If someone can point me at a working example of this nature in some other
language, I can compare to see what is different. Please understand that
it is not FORTRAN that is the problem, but the DECwindows VAX bindings and
their documentation.
Steve
|
1419.2 | I got it to work from Ada... | GSRC::WEST | Varibles don't, Constants aren't | Fri Sep 15 1989 01:13 | 11 |
|
I had the same problems with Ada. I ended up importing the MIT C Binding
of XtAppCreateShell and it worked fine.
I haven't tried XtAppMainLoop yet. I got the error 'MultiplexInput' when
I used XtMainLoop and then realized that I needed to use XtAppNextEvent and
then XtDispatchEvent. I used these since I multi-threaded the toolkit.
-=> Jim <=-
|
1419.3 | keep us informed. thanx | TXAATC::MORANDI | GVA Ed Services | Wed Oct 11 1989 06:01 | 2 |
|
|
1419.4 | ...got an example for ya... | GSRC::WEST | Variables don't, Constants aren't | Thu Oct 12 1989 01:04 | 9 |
|
I wrote an example program multi-threading the toolkit. It is written in
Ada and it is note 255.* in the DW_EXAMPLES conference.
Check it out...
-=> Jim <=-
|
1419.5 | where is the dw_examples | GYPSC::BINGER | beethoven was dutch | Fri Oct 13 1989 06:38 | 6 |
| Which node is the DW_EXAMPLES on
>Ada and it is note 255.* in the DW_EXAMPLES conference.
Stephen
|
1419.6 | | VANISH::BAILEY | focus? _what_ focus | Fri Oct 13 1989 09:02 | 2 |
| ELKTRA::DW_EXAMPLES... Press KP7 or select
|
1419.7 | PASCAL example available | FEGPX::SWEENEY | Patrick Sweeney in Hong Kong | Tue Jan 09 1990 06:08 | 2 |
| Note 321 in DW_EXAMPLES contains a complete PASCAL example using the
VMS bindings.
|