eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ProgressNotification':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: ProgressNotification


Inheritance:

   Object
   |
   +--GenericException
      |
      +--Notification
         |
         +--UserNotification
            |
            +--ActivityNotification
               |
               +--ProgressNotification

Package:
stx:libwidg2
Category:
Kernel-Exceptions-Notifications
Version:
rev: 1.15 date: 2023/06/21 14:15:20
user: cg
file: ProgressNotification.st directory: libwidg2
module: stx stc-classLibrary: libwidg2

Description:


This should be used in long-going activities to tell the caller about any
progress (percentage).
Being a notification, it will be ignored if no one is interested.
If someone is interested, the caller may present this information as a progress-bar,
percentage display or whatever is useful in the UI.
Examples are:
    http-requests, ftp requests, long lint checks etc.

See examples (look for references to this class) on how this is used.

 ProgressNotification handle:[:ex |
    Transcript showCR:(ex progressValue rounded).
    ex proceed.
 ] do:[
     #(0 1 2 3 4 5 6 6 7 8 9)
         do:[:i| Delay waitForMilliseconds: 50]
         displayingProgress: 'Progress'
 ].

copyright

COPYRIGHT (c) 2008 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.

Class protocol:

notification
o  notify: message progress: aPercentageNumber

o  progressCountDone: nDone ofTotal: nTotal
as this is such a common task, this one computes the percentage for you,
given the amount of work done and the total amount to do

o  progressPercentage: aPercentageNumber

o  progressPercentage: aPercentageNumber messageText: messageText

o  progressPercentage: aPercentageNumber statusInfo: statusInfo


Instance protocol:

accessing
o  progressValue
answer the parameter that was passed to the notification request
as percentage parameter

o  statusInfo
any additional info (opaque to me)

o  statusInfo: something
any additional info (opaque to me)



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 17:23:57 GMT