Page 1 of 1

[Author actions] open file in new tab

Posted: Thu Jun 04, 2009 3:49 pm
by Tanking
Hello again,

I would really enjoy if we could open a file in a new tab from the AuthorAcess class in user extended AuthorOperation's, and refresh the project.xpr.

I am currently using command lines but this can be somewhat unreliable because it opens sometime multiple instance (ignoring -Dcom.oxygenxml.MultipleInstances=false), sometime open new tabs depending on the environment. (Having mixed results on vista, pretty consistent on XP where it follows the MultipleInstances=false).

A simple AuthorAccess.openFileOrProject(File | URI| whatever ) would be great.

Re: [Author actions] open file in new tab

Posted: Thu Jun 04, 2009 4:35 pm
by sorin_ristache
Hello,

In version 10.3 we will add such a method to Author API for opening a file or a URL from an Author custom action. You can see how it works if you contact us for sending you a download URL for an updated Author SDK (newer than the one from the Developer page) that implements that.


Regards,
Sorin

Re: [Author actions] open file in new tab

Posted: Thu Jun 04, 2009 4:38 pm
by sorin_ristache
Tanking wrote:I am currently using command lines but this can be somewhat unreliable because it opens sometime multiple instance (ignoring -Dcom.oxygenxml.MultipleInstances=false), sometime open new tabs depending on the environment. (Having mixed results on vista, pretty consistent on XP where it follows the MultipleInstances=false).
Check if you have a firewall or other Vista application that blocks any connection to local ports. Oxygen checks at startup if another instance is already running by trying to connect to a local port.


Regards,
Sorin

Re: [Author actions] open file in new tab

Posted: Mon Jun 08, 2009 10:35 pm
by Tanking
Perfect!!!

Thanks a lot for your accurate answers.

While I am at it. Currently users need to save the file between each Author Operation, otherwise the AuthorAccess is not synchronized anymore with the current display.

Would it be possible to have also a save function from the AuthorAcces? Or at least a method to check synchronization so i can alert the users to save (CTRL+S or whatever)?

At the moment, two consecutive actions modifying the content result quite often in a nice Oxgyen side obfuscated Exception.

Re: [Author actions] open file in new tab

Posted: Tue Jun 09, 2009 10:00 am
by sorin_ristache
Hello,

AuthorAccess always accesses the current content of Author document regardless of the saved state of the Author document. One AuthorAccess operation executed from an Author user extension applies a modification to the current Author document and the next operation will be applied to the result of the first one.

What operations do you do in your user extension and what exception do you get? Can you post also a sample document and the cursor location when you do the operations? We need that for reproducing the problem.


Regards,
Sorin