The API Reference write that this method is not a safe method to get active doc,i also find it really is not safe.
I called this method in AVComputeEnabledProc.
The first document was opened by user and this method give me the right answer.
The second document was opened by an Acrobat plugin with "AVDocOpenFromFileWithParams" then the problem appeared,the method worked not correct.it give me the first document still.
My problem is how can i get the exactly active document?
Can i use notification of "AVAppFrontDocDidChange" to get the active document?Is this a safer method?
Thanks in advance.
Depending on how you are trying to get the active doc, you should be able to use some other context to retrieve the AVDoc the user is working with. For example, if your method works with AVPageViews you can use AVPageViewGetAVDoc to return the AVDoc. It all depends on how your method and workflow happen, which you didn't really provide any information about.