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


Arguments: class-or-class-name

Returns the name of one of the slots of the specified class, which will be used to print instances of the class in a meaningful way in class-grid widgets and object-editor dialogs. The value may be set at any time by calling (setf primary-name-slot).

class-or-class-name should be either a class object or the name of a class.

If a secondary-name-slot has also been established for this class, then the values from the two slots will be printed together with a comma and space in between, as in:

"primary-slot-value, secondary-slot-value".

These slots are used whenever a class instance is displayed in a cell of a class-grid, or in a widget on an object-editor, or in a built-in pop-up menu of an object-editor. At those times, primary-name-slot is called on the class. If a slot name (rather than nil) is returned, then a string is derived from the value of this slot and the value of the secondary-name-slot, if any. Otherwise the class instance will be printed using its print-object method, as usual.

These slot values are also used internally to cache a sorted list of the edited-instances of an object-editor dialog. That allows browsing the instances in an intuitive order, and allows the object-editor-select facility to handle a large number of choices as a series of pop-up menus.

This facility may be useful for a couple of different reasons:

  1. It may be desirable for the user interface to present a "pretty name" that is different than a print-object string that's more useful to developers.
  2. The IDE's Class Interface Editor dialog (where these slots can be specified) can be used to create browsers of database classes without writing any code, not even a print-object method.

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.

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