# jalert.tcl

## Introduction

The jalert.tcl library is distributed as part of the jstools package. It provides a modal alert panel you can use to present notices to your users. It's fairly intrusive, so it should be used sparingly.

This document describes jalert.tcl version 4.0/4.0.

## Usage

### Accessing the Library

In order to use the jalert.tcl library, it (and any other libraries it depends on) must be in your Tcl `auto_path`, described in `tclvars`(n). Information about how to arrange that, and other conventions common to the jstools libraries, is in the Usage section of The jstools Libraries.

## Credits and Copyright

### Author

Jay Sekora

`js@aq.org`

`http://shore.net/~js/`

###

Copyright

The library is copyright © 1992-1994 by Jay Sekora, but may be freely copied and modified for noncommercial purposes. (Please contact me if you want to use it for a commercial purpose, this may be OK under some circumstances.)

## Overview

### Procedure

`j:alert` - alert panel

## j:alert

### Usage

`j:alert` [options]

### Options

`-title` title`` (localisable, default `Alert`)

`-text` text`` (localisable, default `Alert!` - not really optional)

### Example

`j:alert -title Error -text \

"File \"$file\" not found."

`

### Description

This prodedure creates a popup alert window displaying the text text (in a message widget), with an OK button which will make the alert box go away and return control to your application.

If title is specified, it will be the title of the panel, for use by the window manager.

If the global variable `J_PREFS(autoposition)` is true, the panel will be (approximately) centred on the screen by the `j:dialogue` procedure (in jtkutils.tcl).

## Future Directions

* You should be able to specify a class for the toplevel panel.

* There should be a way to specify how important a particular notice is, and a user preference for how important a notice has to be in order actually to be displayed (along the lines of the `j:confirm` panel).

``