home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
TEDdesk
/
reloc.9
/
$TED_DIR
/
bin
/
dtfile_error
Wrap
Text File
|
1998-08-19
|
2KB
|
64 lines
#! /usr/dt/bin/dtksh
#####################################################################
# Display an error dialog using the argument(s) as the message
#
# This script can be used by applications to display an error
# dialog when it would be difficult or impossible to do in the
# context of the executing program. For example, it can be used
# when exec fails in a child process or if an error is detected
# before an applications main window can be realized.
#
# (c) Copyright 1993, 1994 Hewlett-Packard Company
# (c) Copyright 1993, 1994 International Business Machines Corp.
# (c) Copyright 1993, 1994 Sun Microsystems, Inc.
# (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of
# Novell, Inc.
######################################################################
#--------------------
# OK button callback
#--------------------
okCallback()
{
exit
}
#------
# main
#------
MESSAGE="$@"
TITLE="dt Error"
XtInitialize TOP dtError DtError "$@"
#ifdef 1
XtDisplay DISPLAY $TOP
#endif /* SPR007204 */
XmCreateErrorDialog DIALOG \
$TOP \
"Test" \
dialogTitle:"$TITLE" \
messageString:"$MESSAGE"
# remove cancel and help buttons
XmMessageBoxGetChild CANCEL $DIALOG DIALOG_CANCEL_BUTTON
XmMessageBoxGetChild HELP $DIALOG DIALOG_HELP_BUTTON
XtUnmanageChild $CANCEL
XtUnmanageChild $HELP
XtAddCallback $DIALOG okCallback "okCallback"
XtManageChild $DIALOG
#ifdef 1
XmInternAtom wm_delete_window $DISPLAY "WM_DELETE_WINDOW" False
XmAddWMProtocolCallback $(XtParent "-" $DIALOG) $wm_delete_window "okCallback"
#endif /* SPR007204 */
XtMainLoop