Command subsystem

The Command subsystem provides Taligent programs with a mechanism to execute commands on a document. The WebRunner Sample uses this subsystem to implement a command to replace the contents of an entire document.

Context-sensitivity is important because the link must decide whether to open a new document or to fire off a command at its parent.


To execute the command, TWebLinkView uses its link's model reference to create a TModelSelection and a TDocumentSurrogate. It then uses the selection to create a TDocumentComponentCommandBinding which it hands to the document surrogate to adopt and do. By using the command mechanism on the document this way, this program is placing the command in the document's command history, so the global Undo and Redo operations automatically operate correctly in returning to any previous page.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker