| How to create a hierarchy of objects in one command? [message #391936] |
Tue, 22 March 2005 08:54  |
Jaap Reitsma Messages: 69 Registered: July 2009 |
Member |
|
|
Hi,
I want to create an object and all necessary ancestors in a single command
for undo support, like in XPath notation:
Segment/CreationInformation/Creation/Abstract/FreeTextAnnota tion
I want to add/modify the FreeTextAnnotation, but its ancestors up to Segment
(my selection) might not yet exist.
I suppose I should use the CompoundCommand. But how? What is the pattern?
Should I use the ItemProviders?
Kind regards,
Jaap Reitsma
|
|
|
| Re: How to create a hierarchy of objects in one command? [message #391937 is a reply to message #391936] |
Tue, 22 March 2005 09:07  |
Ed Merks Messages: 24564 Registered: July 2009 |
Senior Member |
|
|
Jaap,
Only the attachment of the new object, or the change to the existing
FreeTextAnnotation needs to be done with a command. The object you add
can be prepopulated and that does not need to be done with commands
because it does not need to be undone. If you do need to compose
commands, then you need to use a CompoundCommand. Look at examples of
where it is used in the framework, e.g., SetCommand.
Jaap Reitsma wrote:
>Hi,
>
>I want to create an object and all necessary ancestors in a single command
>for undo support, like in XPath notation:
>
> Segment/CreationInformation/Creation/Abstract/FreeTextAnnota tion
>
>I want to add/modify the FreeTextAnnotation, but its ancestors up to Segment
>(my selection) might not yet exist.
>
>I suppose I should use the CompoundCommand. But how? What is the pattern?
>Should I use the ItemProviders?
>
>Kind regards,
>
>Jaap Reitsma
>
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.06661 seconds