Skip to main content
Known Participant
December 6, 2007
Question

How to make a similar panel like Links in InDesign (Problems in UnDo case of DocObserver).

  • December 6, 2007
  • 6 replies
  • 533 views
I want to implement the similar operation as that of the Links panel Plugin.
Whenever a new image is placed on the document its should populate in the tree. And when it is deleted it should disappear.
I am able to do that by using a DocObserver, but the issue is that in when an object is placed on the document it populates on the tree but when Ctrl+Z is done it does not get disappear from the tree though it diappears from the document.
Similar is the case for the deletion of any image frame, when deleted it disappers from the tree but when it is undone it though come back on the document but does not appear on the tree view.

The code was working fine in CS2 as i was able to use the case
if((protocol == IID_IHIERARCHY)
(theChange == RemoveFromHierarchyCmdBoss || theChange == kAddToHierarchyCmdBoss )) in the update but in CS3 there is no UnDo support for coading so I am unable to trap that event in the update and remove the object from the tree.

But positively there would be some way to implement the required operation as it is done for the Links panel.

Plz anybody help me and kindly reply ASAP for that Advance thanks...
This topic has been closed for replies.

6 replies

Known Participant
December 7, 2007
Anybody of us having any clue of the same plz turn up asap to help.
I need it very Badly...
Known Participant
December 7, 2007
Thanks Dirk for your kind reply,
But lemme know how the Responder will help here in this case...
Inspiring
December 6, 2007
Search LinksID.h for "Responder"
Search the SDK for Responder in general.

Dirk
Known Participant
December 6, 2007
Andres I have implemented what you suggested but still the UnDo is not trapable in the updated.

Do any body of us have an Idea that how the LINKS panel of the InDesgn have implemented it though it does not have the "Empty Graphics frames" case handled there but still its idea will bring us very near to what is required.

I need it badly kindly help me...
Known Participant
December 6, 2007
Thank Andreas for you kind support but the problem is I need to list the "Empty Graphics frames" as well on the tree.
Also I suppose the Undo case will not be able to be trapped in the Update. Will it be...
Participating Frequently
December 6, 2007
Hi Rizwan.

As you know, linking and unlinking of images are performed by the kAddLinkCmdBoss and the kRemoveLinksCmdBoss respectivley. These are most likely broadcasting the change on the kDocBoss on the IID_ILINKSMANAGER protocol. If you attach an observer to listen to this protocol you should be notified correctly, even during undo.

Regards,
Andreas