UserNotification.st
author Claus Gittinger <cg@exept.de>
Fri, 07 Jul 2000 16:13:34 +0200
changeset 5449 bf1de72fd2bb
parent 5295 f144309dab04
child 6206 59d1ec1e1ed5
permissions -rw-r--r--
preps for rel5 migration

"
 COPYRIGHT (c) 1999 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"


Exception subclass:#UserNotification
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'Kernel-Exceptions'
!

!UserNotification class methodsFor:'documentation'!

copyright
"
 COPYRIGHT (c) 1999 by eXept Software AG
              All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

!

documentation
"    
    UserNotification is an abstract superclass of all user notification 
    exceptions in the system. It produces an info box with the message
    on the screen.

    [author:]
        Stefan Vogel

    [see also:]
        Signal
"
!

examples
"
                                                            [exBegin]
    UserNotification raiseRequest
                                                            [exEnd]

                                                            [exBegin]
    UserNotification raiseRequestWith:nil errorString:'what ?'
                                                            [exEnd]

                                                            [exBegin]
    UserNotification raiseRequestWith:nil errorString:' what ?'
                                                            [exEnd]
"

! !

!UserNotification class methodsFor:'initialization'!

initialize

    NotifierString := 'User Notification:'.

    "
     self initialize
    "

    "Created: / 23.7.1999 / 15:31:44 / stefan"
! !

!UserNotification methodsFor:'default actions'!

defaultAction
    "Default action for notifications: open a info box with description"

    |text|

    text := self description.

    (Smalltalk isInitialized and:[Dialog notNil]) ifTrue:[
        Dialog notify:text.
    ] ifFalse:[
        "
         on systems without GUI, simply show
         the message on the Transcript.
        "
        Transcript showCR:text.
    ].
    self proceed.


    "
      UserNotification raiseRequestWith:self errorString:' abc'
    "

    "Modified: / 3.8.1999 / 14:06:55 / stefan"
! !

!UserNotification class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/UserNotification.st,v 1.3 2000-03-19 17:16:43 stefan Exp $'
! !
UserNotification initialize!