next up previous

9.4.4.6 Directly Duplicating an Instance

Syntax

(defmessage-handler USER direct-duplicate primary
  (?new-instance-name ?slot-override-expressions))

This handler duplicates an instance without using put- messages to assign the slot-overrides. Slot values from the original instance and slot overrides are directly copied. If the name of the new instance created matches a currently existing instance-name, then the currently existing instance is deleted without use of a message. The slot-override expressions are passed as an EXTERNAL_ADDRESS data object to the direct-duplicate handler. This message is used by the functions duplicate-instance and active-duplicate-instance.

Example

The following around message-handler could be used to insure that all duplicate message slot-overrides are handled using put- messages.

(defmessage-handler USER direct-duplicate around
   (?new-name ?overrides)
   (send ?self message-duplicate ?new-name ?overrides))


next up previous