Hi Andreas, Thank you very much for your advice. I changed onFirstVisibleTask to OnViewCreated, but when I debug it, the executeAsync() is still never called. I am afraid there is something wrong with the configuration files.
The Attachment is a simple TestAddon created using the OO plugin with NetBeans, which only implements the XAsyncJob interface. And I copied the related information from the example AsyncJob provided by the developer guide. If you have time, would you please help review the project? I much appreciate your help. Andreas Schlüns-2 wrote: > > wheelsdong wrote: >> Hi Carsten, >> >> Thank you very much for your advice. I followed the links you provided >> and >> tried to run the example, but I failed. My steps are below. >> >> I read the chapters on Jobs of the developer guide. Then I tried the >> example >> JobsAddon provided by SDK. The path is >> OpenOffice.org_2.4_SDK\examples\DevelopersGuide\Components\Addons\JobsAddon >> There are three files in this example: Addons.xcu, AsyncJob.java, >> Jobs.xcu. >> >> I created a simple OpenOffice.org Add-on using the OpenOffice plugin for >> NetBeans, we call it NewAddon. Then I did the following: >> 1, copied the configuration code in Addons.xcu of JobsAddon to Addons.xcu >> of >> NewAddon. >> 2, copied the file Jobs.xcu to the project NewAddon >> 3, extended XAsyncJob interface in NewAddon and copy the code in >> executeAsync() to the same method in NewAddon. >> >> After building successfully, I made a breakpoint in executeAsync() and >> tried >> to debug the NewAddon. But executeAsync() was never called. >> >> I am afraid I am not using Jobs correctly. Would you please share me some >> examples or give me more advice? Thank you very much. > > > Did you changed the Jobs.xcu so it uses the right event ? > Example Jobs.xcu file uses e.g. "onFirstVisibleTask" where you should > use "OnViewCreated" for your special purpose. > > Regards > Andreas > > http://www.nabble.com/file/p20318331/MyAddOn.zip MyAddOn.zip -- View this message in context: http://www.nabble.com/Where-to-register-MouseClickHandler-in-an-Add-On--tp20221786p20318331.html Sent from the openoffice - api dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]