Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

primary-name-slot

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-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