FunctionPackage: net.jlinkerToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

jregister-handler

Arguments: object event handler &key data count

object, the first argument, may be a remote Java reference object used to specialize the Lisp method. object may be nil to denote an event not associated with an object.

The value of the handler argument should be a function which will be the handler for the event. The form of the function is given below. handler may be nil to delete a handler.

The data argument is any Lisp value. It is passed to the handler function as the first argument in each call.

The count argument may be an integer that specifies the lifetime of the handler or nil. A nil value specifies a handler that will persist until deleted. A positive integer is decremented after each call. When the value reaches zero, the handler is deleted. For example, a count of 1 defines a handler that will handle one event and then will disappear.

Note that only one handler may be specified for each event and object combination. A new handler definition simply overrides an existing one.

The template for a handler

A handler function should have an argument list:

Arguments: data object longs strings event seqnum

The arguments to the event handler are the data and object that were used in the call to jregister-handler. The third argument is a sequence of integer values representing the numeric data associated with the event. The fourth argument is a sequence of strings representing the string data associated with the event. The event name is passed so that several events could share the same handler. The seqnum argument is the sequence number assigned to the event by the Java event handler. It may be used to identify events or detect lost events.

See jlinker.htm for more information on the jLinker facility.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version