Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version

widget-value-equal

Arguments: value1 value2

This function is used as the initial value for the on-change-test property of a dialog-item. When the two values are both strings, then the result of calling string= on the two values is returned; otherwise the result of calling eql on the values is returned. This special function is provided in order to match string values properly (so strings with identical characters will be considered the same), but without inefficiently recursing into deep trees or other complex widget values needlessly, as equal (which does consider strings with identical characters the same) might do.

This is a generic function, and could be extended with additional methods. For example, if an application often uses RGB color objects as widget values (see make-rgb), then the following method could be added to cause equivalent RGB widget values to always match, without changing the on-change-test property of every widget that might hold RGB's. (eql will always return nil for two RGB objects.)

(defmethod widget-value-equal ((value1 rgb)(value2 rgb))
  (rgb-equal value1 value2))

Since the on-change-test property is designed to use basic functions like equal that take only two arguments to be compared, there is no dialog-item argument to specialize on and, as a result, this generic function cannot be specialized on particular dialog-item subclasses.


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

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
Unrevised from 9.0 to 10.0.
9.0 version