Andy Black wrote:
> 
> In our configuration files for a custom kind of paper, I'd like to be 
> able to invoke a macro command we've written whenever any one of several 
> elements are inserted.  From looking at the configuration documentation 
> and the programmer documentation, I did not see any way to do this.  I'm 
> hoping I missed something.
> 
> The particular use is as follows:
> 
> We have several "reference" elements which contain an IDREF to 
> particular kinds of elements (which have an ID attribute).  For example, 
> there are "reference" elements to sections, one that refers to examples, 
> and citations to bibliographic references.  We have built a macro 
> command which invokes a pick dialog box showing just the appropriate 
> element IDs (or other more relevant information). For example, if the 
> element is a reference to a section, only the section elements are shown 
> in the dialog.  If it is an example "reference", only the example 
> elements are listed.
> 
> Currently, the user inserts one of these "reference" elements and then 
> has to manually invoke this pick dialog command to see the list of 
> elements to "refer" to.  It would be great if we could make it so that 
> as soon as one of these "reference" elements is inserted, the pick 
> dialog would automatically come up.
> 
> Is there some current way to do this?

What you request is not implemented because, in our opinion, such 
feature is not really needed.

The idea is to write a (undoable) macro which:

[1] Insert one of the several "reference" elements.
[2] Displays the pick dialog in order to update the IDREF of the newly 
inserted "reference" element.

After doing that, suffice to tell your users to always use the toolbar 
(customized by you) or a specific keyboard shortcut to insert any of the 
"reference" elements.

If some users forget to do so and keep using the Edit tool, then keep 
part #2 of the macro (the pick dialog) available as a standalone 
command. In such case, a user will have to manually invoke your "pick 
ID" command after having used the Edit tool to insert any of the 
"reference" elements.

Reply via email to