How to get rid of fervent activeselectionobserver automatically on any new document?

I enclose my ActiveSelectionObserver on a paper on the kAfterOpenDocSignalResponderService of pasing the docRef.

Please see code below:

 case kAfterOpenDocSignalResponderService:
    {
         InterfacePtr<IDocumentSignalData> documentSignalData(signalMgr, UseDefaultIID());
         UIDRef docUIDRef = documentSignalData->GetDocument();
      /*ActiveSelectionObserver: this will observe all the selection changes in the document  pageItems selected, text selected, deselected etc.*/
        InterfacePtr<IObserver> selDocObserver(docUIDRef, IID_ICSDTSELECTIONOBSERVER);
        if (selDocObserver != nil)
        {
            selDocObserver->AutoAttach();
        }

        break;
    }

The observer is supposed to get attached to the event to open an existing document, but once the observer is set on the document, and then when I create a new doc, the observer gets attached to this

doc who so want to restrict. I want to just my observer to reply only to the doc that I used to refer to the observer.

What should I do?

Divide your code in (at least) two observers.

(1) Observer for the following selection selection (page elements, text, etc.). The purpose of this observation is probably to copy values from the suites of selection in the user interface widgets. This observation is better aggregated on a related UI pattern such as your boss to sign palette, so there is only one instance of the observer. There, he uses the IID_IOBSERVER and is therefore automatically attached when the Panel is displayed. Legacy observers selection code calls methods of laying/removing additional (AttachToDocument etc.) when required by the selection - this is probably to disturb you.

(2) some other observers interested in changes to the template of each document. This observer has several occurrences aggregated on each boss of the document (or similar), employs its own private IID. Attach/detach is your responsibility, for example via the signal answering services.

Dirk

Tags: InDesign

Similar Questions

  • How to get rid of internet shortcuts mass contained in the document library?

    I tried to add a folder my documents. Seem to have merged now all my "Favorites" in the toolbar with my documents.

    Documents are now full of internet shortcuts and I do not want the files.

    Use the working documents and they need to see that word or powerpoint or pdf files, not stuff from the internet.

    Don't know how I did it or how to get rid of all these files.

    Can anyone help please? Thank you

    Hello

    I don't know what you have enabled.

    Do a system restore, if necessary using the safe, before the problem started.

    http://bertk.MVPs.org/html/restoresysv.html

    How to access Safe Mode

    http://www.bleepingcomputer.com/tutorials/how-to-start-Windows-in-safe-mode/#Vista

    See you soon.

  • How to get rid of the spam mail which contacts automatically appear when you are composing mail.

    If you receive mail spam, how get rid you of the automatic spam mail contacts when composing mail?

    The only thing I know that you can do is mark as junk, it always goes to this mailbox. I found that by selecting unsubscribe at the bottom of the mail header so that mail generally does not stop them from coming. Finally, some of them will stop on their own.

  • Adware? And how to get rid of?

    Since last week when I'm redirected to a game at random navigation site. First of all, I thought it was just something to do with Firefox (the browser I used), but then the same thing happened with other browsers too. I then installed Opera to judge if it would happen again and Yes, it happened. Then I tried to reinstall the whole OS, hoping that would solve the problem. There can be no. I always get redirected to a site "yu0123456". How to get rid of this? I installed AdGuard so it blocks me enter the site, but still not open tabs. After the reset of the operating system (I also erased the hard drive), I did not visit malicious sites. I just downloaded programs I had before that happens again (steam, Spotify, discord). I tried to scan my Mac with Malware Antibytes, but he found nothing. If it's harmless, I could live with that, but it's very irritaring. If there is a chance he could phis my information, so I want that he removed as soon as possible. What can I do?

    Thanks in advance!

    Adware is usually not malicious. Its purpose is to push ads into your face. Adware makers get a fraction of a payment of one hundred whenever an ad is shown. That's their motivation.

    You say wipe you the drive, but if you restored a backup Time Machine or Migration Wizard to restore your applications and the user account, you managed that by copying the problem at the back.

    MalwareBytes for Mac can't catch everything. The adware manufacturers are constantly changing which moved things and which appoints the files have. It's a job without end for manufacturers of MalwareBytes to catalogue these items, so they can be found and removed. But of course he is not hurt anything to use as it can remove a lot of problems for you, leaving only the new elements, unknown to locate and remove manually.

    Depending on where you have steam, Spotify and discord, the installers may have been (and often are) responsible for the installation of adware and you want to install.

    Download and run EtreCheck. Copy and paste the results here. It is written and maintained by long time forum member etresoft. Any personal information is automatically excluded from the output. The goal is to see what processes are running on your Mac. From there, they can usually determine what is wrong.

  • Application Builder-how to get rid of the savings going to project after generation?

    Hello

    I'm using LabView to project continuous integration with Jenkins. I have a vi that runs test cases is build of the project, then bed information on the results of Jenkins.

    After a success, there is a warning that I have unsaved changes in the project that I wanted to build. This message is to close labview and jenkins of the display of the results

    Here I found information about this warning at the first "Note".

    http://FTP.datx.com/public/DataAcq/LV-link/LVLinkWebHelp/Building_and_Distributing_an_Application.ht...

    How to get rid of this warning, or save changes automatically, so that I don't have to click 'Save' after each generation?

    Thank you

    Karol

    First of all, you don't want to get rid of this warning. It is this backup which makes the work number version auto-incrémentées. LV has to save the new version number in the project.

    Yes, you can make a backup. Somewhere, to do the code LV, who runs a program generation. At the end of this process, you need to save the project. There is a method to do project.

    I wrote a small program for me to open a project, perform the selected builds and copy the installer resulting in a USB key.

    Mike...

  • How to get rid of the old and always offered updates - Vista

    Hello, I have Vista and it offers me a very old version of the updates to be updated and for this reason I can't get/retired new updates... Update window keeps on telling me that I have 165 updates to be downloaded and installed... It happened after re-installing the operating system as 4months ago and even after the automatic updates when I changed the settings to ask me before auto update... So I tried to make them hidden, but after each reboot, Vista offers me the same old * I don't want to have on my computer because after a re-installation of the wi - fi stopped working and I had to download the new drivers on the computer of my gf. Does anyone know how to get rid of them? Where a list or scheduled updates are stored? Thank you very much, I like Vista. He brought me only good times with my computer. Tomas

    Hello

    Follow these steps and check if that helps.

    Step 1:

    I suggest you to reset the updated Windows components and check if that helps.

    Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    322756 how to back up and restore the registry in Windows

    Step 2:
    Problems with the installation of the updates.

  • my computer is infected by the defense of windows... does anyone know how to get rid of it

    original title: defense of windows

    my computer is infected by the defense of windows... does anyone know how to get rid of it

    my computer is infected by the defense of windows... does anyone know how to get rid of it

    Try this link. It has an automatic removal request.

    Remove Windows defence. Description and removal instructions
    http://www.2-spyware.com/remove-Windows-defence.html

    For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • Downloaded off youtube downloader movies & they are recorded on video xbox on my Surface, but I don't know how to get rid of them?

    Original title: removal of videos

    I downloaded movies on youtube downloader & they are recorded on video on my xbox surface, but I don't know how to get rid of them?

    Help please.

    Hi Francois,.

    Welcome to Microsoft Community where you can find the answers related to Windows.

    According to the description, it seems you are trying to delete videos from Xbox movies.
    By default the video app will appear in the video window Library locations, and then the video application can detect the content automatically from the video library.
    I suggest you open Windows Video Library and check if the videos are there are.
    a. in Windows 8 start screen, tap or click out of office. This will open the classic view from the office.
    b. tap or click File Explorer (the Manila folder next to the icon of Internet Explorer icon).
    c. under libraries, tap or click on videos.
     
     
    Keep us informed on the status of the issue.
     
     
    If you need Windows guru, do not hesitate to post your questions and we will be happy to help you.
  • All my photos are displayed such as BW because somehow I saved a preset to quickly develop and it records in BW.  This is for all of my photos.  Individually, I can cancel their but did need help how to get rid of the pre-selection, so he's going to defau

    All my photos are displayed such as BW because somehow I saved a preset to quickly develop and it records in BW.  This is for all of my photos.  Individually, I can cancel their but need help how to get rid of the preset then all photos of goes to Default or in the shot. Thank you

    Go to the develop module and highlight all the images in the film at the bottom of the screen. Enable automatic synchronization, and then click the reset button. To reset all the images in your camera default settings.

  • Each new tab includes search Secure AV - how to get rid of him?

    Each new tab includes search Secure AV - how to get rid of him?

    Type of topic: addons< enter > in the address bar to open your add-ons Manager.
    Access key; < Control >(Mac: < command >)< shift > has)

    In the Manager of Add-ons, on the left, select Extensions. Remove AVG
    Whatever it is. Now do the same in the case computer programs.

    Windows: Start > Control Panel > uninstall programs.
    Mac: Open the folder "Applications".
    Linux: See your user manual.

  • How to get rid of a popup offering to remember my password that appears in the upper left corner?

    Yes, this popup is annoys me no end! It appears each time I fill in a password anywhere! It is more or less said: "Do you remember this password?". first of all I didn't know what program did this, but now I know that it is Mozilla Firefox. Why so many of (and undesirable too) want to pop-up windows to 'help' when in fact what they do is irritate the person and not even identify the program. It is a parody of the worst kind! You do not?

    If anyone knows how to get rid of it forever, please let me know? Thank you very much! Adelaa

    If you want to just disable this for a specific domain, you can click the drop-down list and click "never for this site". Otherwise, you can go to the Security section of the firefox preferences (enter ' subject: preferences #security ' in the address bar) and uncheck "remember passwords for sites".

  • How to get rid of the stupid list dropdown in the search box

    How to get rid of the stupid list dropdown in the search box

    If you want to restore the window previously used independently to manage search engines, you can enable or disable this pref to false with a middle-click on the topic: config page.

    • topic: config page: browser.search.showOneOffButtons = false

    Close and restart Firefox to force change.

  • How to get rid of this annoying blue arrow?

    I get this annoying blue arrow every time in my search page that ruins my browsing experience. very irritating sound can you please tell me how to get rid of it.

    It is related to Google.

    Have you tried to disable 'instant Predictions?

    See also this thread:

  • How to get rid of double dash in signature

    31.2.0 running. How to get rid of the double-dash? All the solutions say to go to the tool / Options, but in this new version, there is no option under Tools.

    Help, please. Thank you.

    This table can be useful for later use.

    _Linux, http://KB.mozillazine.org/Menu_differences_in_Windows, _and_Mac

  • How to get rid of the new menu button on the right side of the toolbar

    Honestly, I don't know why the developers cannot offer new features that we can use or not, by choice. Instead, things are forced upon us.

    Could someone tell me please how to get rid of the new menu button on the right side of the toolbar?

    It doesn't seem to be an option to remove via the Customize Toolbars window.

    Thank you very much.

    CTR extension makes Firefox customizable menu button 3 bar, so you can drag this button in the palette to customize to remove it from the Navigation toolbar.

    Reload and stop probably combine only if you set the two buttons in the correct order (reload - Stop and non-Stop - Reload)

Maybe you are looking for

  • FFT in 3d waterfall

    Hello Currently I have a vibration of a map of 9234 signal and show in on different graphs having the FFT analysis on it. The photo below shows me what doing. Unfortunately, I would really like to show on a 3-d of the waterfall chart, but have no ide

  • the ad7476A buffer size and device

    Hi, I use the BF Analog read ad7476a (modified) vi. But I can't get the size I want filled a tampon... Somehow I think the buffer is limited to an array of 128 items, but I've set with 256, when I show the initialized array, it says I have 128 elemen

  • Microsoft Results sweepstakes Promotions - 'your E-Mail_Id have won', is real?

    I received an email from microsoft.com e-mail and I don't know if it is fake than others It looks something like this... ----------------------------------- NOTIFICATION OF THE OFFICIAL WINNER. We are pleased to announce the publication of the result

  • * Reproductible Bug *-don't break until you restart

    My family has / have 4 fuses and 20 clip + I'm not kidding, we've used them for years, they break I buy new. I would like the clip to the back of the clip + was stronger I which breaks all the time... OK the bug reproducible for as long as I can reme

  • Error ID: 0x800CCC0E.The connection to the server has failed in Windows Live Mail.

    Original title: Windows Live Mail connection. I've updated my computer to Windows 7. Previously I used Outlook Express for my email, now I have Windows Live Mail. I can receive emails, but I get the following error message when I send an email. The c