Hello vijay,
vijay patil escribió:
As discussed in thread (
http://www.openoffice.org/servlets/ReadMsg?list=dev&msgNo=21639), I received
three SDK examples as NB projects.
for those not following the other mailing list, vijay is talking about
three examples I send him
a NB project of sdk/examples/DevelopersGuide/Text/TextDocuments.java
a NB project of sdk/examples/java/EmbedDocument/EmbeddedObject/*
a NB project of
sdk/examples/DevelopersGuide/Spreadsheet/ExampleAddIn.java et. al.
temporary available now at
http://www.ArielConstenlaHaile.com.ar/ooo/temp/OOo_NB_Projects.zip
I played around with the example, following is my report.
1. NB Project: TextDocuments_java
No issues here. I can build and debug this client application.
2. NB Project: ExampleAddIn
I can successfully create extension (ExampleAddIn.oxt) and add it
(manually) to OO.org,
in these case where you are just testing/playing around, there is no
need to add nothing manually using the NB plug-in :-) see next comments
using extension manager. I could use functions INCREMENT and COUNTER in a
spreadsheet. Good example
of how to add your own functions.
3. NB Project: EmbeddedObject
I can build and create extension (.oxt file) and add it (manually) to
OO.org, using
extension manager. However I could not figure out how to use this extension.
Here is my fault: I should have give you some advice on how to debug
them or the links to the wiki pages.
In short, the project is designed to use the option "Debug Extension in
Target Office", this will finally load a test document with an embedded
object (the document is inside the NB Project folder). You can set
breakpoints in the source, and then choose this option on the projects
context menu. This way you can then activate the embedded object in the
test document (double click in it, or context menu "Edit") and see how
it works.
------------
Once I was comfortable using 'Create OXT' option, I decided to try other
Debug and Deploy options
from NB, for projects ExampleAddIn, EmbeddedObject.
IMHO, for testing UNO components examples, the best option is the one
I already mentioned: "Debug Extension in Target Office", this will keep
your current user installation "clean", because the office is started
with a parameter that creates a user installation inside your NB
Project: /build/soffice_debug/user .
4. If I click on following submenus (after right click on project name)
'Deploy OO.org Extesion'
'Deploy and run extesion in OO.org'
I personally do quite never use these options because I like keeping my
working installation clean. When using "Debug Extension in Target
Office" you can fix everything just clicking "Clean and build".
For deploying, I have a parallel installation only for this testings.
[see http://wiki.services.openoffice.org/wiki/Run_OOo_versions_parallel]
then sometimes (NOT always) I get following error message:
Runtime Error!
Program C:\Program Files\OpenOffice.org 2.3\program\unopkg.exe
This application has requested the Runtime to terminate it in an unusual
way. ...
If I ignore error message and proceed I am able to successfully add the
extension and use it,
so this is not a major issue. What is strange is I do not always get this
error message.
5. If I click on following submenu (for NB projects ExampleAddIn,
EmbeddedObject.)
'Debug extension in target OO.org'
strange things happen.
mmm ...strange to hear this, although not so strange now knowing you're
on Windows (I have experienced some problems in Windows that do not
happen in Linux).
In the beginning I get error message:
Configuration data in 'file::///C:\Documents and Settings\vijay\My
Documents\NetBeansProjects\OOo_NB_Projects\ExampleAddIn\build
\soffice_debug\user\uno_packages\cache\registry\data\org\openofice
\ucb\Configuration.xcu' is corrupted.
If this is the first time you debug the example, this error shouldn't
appear (as the user installation is recreated from scratch inside the NB
Project's folder "build/soffice_debug/" the first time you debug, or
after cleaning the project).
Here just cleaning the project may work.
Anyway, the error message is quite strange, because in [NB
Project\build\soffice_debug\]user\uno_packages\cache\registry there is
no "data" folder, nor the configuration for the nodepath
/org.openoffice.ucb.Configuration.
AFAIK, if it exists in the user layer, it should be in
user\registry\data\org\openoffice\ucb\
not in user\uno_packages\cache\registry
Without this data some functions
may not operate correctly. Do want to continue startup of OO.orgwithout
the corrupted configuration data?
After clicking 'yes' couple of time I get screen which is used when
OO.org is started for the first
time (after installation) (1. Welcome 2. License Agreement .... 5.
Registration). Am I doing
something wrong here?
This is the first start wizard: as I told you, the first time you debug
the project, the user installation is created inside your NB Project
"build" folder. OOo considers this as the "first time" it's being run
for this user, so the first start/registration wizard appears.
IMHO this is very annoying when you debug very often, or need to clean
your project very often.
Thanks to Jürgen, for testing I added the following to the project's UNO
Ant build script:
target name="uno-debug"
<exec executable="${office.soffice}" dir="${office.program.dir}"
failonerror="true">
<arg file="${sample.doc}"/>
<arg value="-nofirststartwizard"/>
<arg value="-nologo"/>
<env key="UserInstallation"
value="${office.debug.user.directory}"/>
<env key="JAVA_TOOL_OPTIONS" value=""-Xdebug"
"-Xrunjdwp:transport=dt_socket,address=${jpda.address}""/>
</exec>
-nofirststartwizard will avoid the annoying first start wizard
-nologo the start up logo
IMHO, the unopkg with GUI option is useful, so no need to avoid it (at
least for me, because so often I add some configuration file, or JAR,
and forget to add it to the manifest; so the GUI is a good way to check
that everything gets installed).
6. I am unable to reproduce following error message which I got few days
back, so no big issue here.
Whenever I try to remove (or disable or enable) ExampleAddIn.oxt using
Extension manager I get
following error something like:
(com.sun.lang.DisposedException) {{{Message = "URP-Bridge : disposed",
Context = (com.sun.star.uno.XInterface) @0}}}
IMHO this is because extensions can not be removed while they are in use.
Here I close every document leaving only the StarModule, or restart OOo
and then remove (another reason why I prefer a parallel installation or
the "Debug Extension in Target Office" option)
Sorry for reporting too many things,
oh no, you're welcome :-)
This shows that once decided the best way to ship the examples (for
client apps. no big issue, but for components: should the first start
wizard be removed?, should the logo also be removed? should we open the
test document? etc.), there should also be some HOW-TOs in the Wiki
* how to debug/install the examples
* how to download them from OOo CVS
* how/where to submit a patch for an error
etc.
I should probably look into source
code.
Didn't you yet?
I would suggest you to start with the documentation. An OOo API
developer's Bible is/should be the Developer's Guide, plus the IDL
reference.
And also the OOo WIKI is beginning to get nice (well, soon the
Developer's Guide will be here).
Regards
Ariel.
--
Ariel Constenla-Haile
La Plata, Argentina
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.ArielConstenlaHaile.com.ar/ooo/
"Aus der Kriegsschule des Lebens
- Was mich nicht umbringt,
macht mich härter."
Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]