Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Java-like scripts of an extension cannot be run | ||
---|---|---|---|
Product: | General | Reporter: | bmarcelly <marcelly.bernard> |
Component: | code | Assignee: | ab |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | Trivial | ||
Priority: | P3 | CC: | issues, marcelly.bernard |
Version: | OOO300m2 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- | ||
Issue Depends on: | 98990 | ||
Issue Blocks: | |||
Attachments: |
Description
bmarcelly
2009-03-04 11:16:25 UTC
Created attachment 60676 [details]
Test extension with Basic, JavaScript, BeanShell, Java, Python scripts.
Created attachment 60677 [details]
Error message when trying to run a JavaScript script.
Looks like issue 98990 The scripts are actually not registered, that is, insertByName is not called. The reason is, that before the function is called at the master script provider, it is asked if the script is already registered. This function returns true which is wrong. The master script provider calls in turn all script providers, of which the python provider returns true. This should be fixed in issue 98990. However, the error message is still displayed which suggest a bug in the scripting providers. BTW, this feature seems long broken. It didn't even work with OOo 2.3 (with python). To test without python, one need to deselect python in the setup and also to remove the entry in the manifest.xml of the test1.oxt which refers to the python code. Created attachment 60964 [details]
script extension in javascript
Created attachment 60965 [details]
installation command line script for Windows OS
I've developed a script extension in Javascript using the Extension Compiler. It used to work just fine in Russian (so-called "Infra") OpenOffice.org 3.0.0. I install the extensions from GUI (I didn't knew unopkg was available on Windows, too). However, during the development of extension, OOo 3.0.1 was released and extension installation broke up again. Installation process went without errors, the toolbar button in Writer was added successfully. But, the script itself seems not to be copied/registered to the library, so pressing the button produces the following error message: "Cannot resolve script location for script = FreshEye.js" The "branch" OOodev- Macros has a node "FreshEye_1.0.oxt" but the node is empty - it doesn't expand, it has no macros ("Macro name" field is empty). Then, I've used latest update of Extension Compiler with latest OOo310m5 build for Windows. No luck, the same message - so I don't think the issue is solved in 3.1 branch, yet :-( Then I've tried to install with unopkg and this time it worked fine with OOO310m5. Reinstalled back Russian OOo 3.0.1. unopkg works, yet the same "Cannot resolve script location for script = FreshEye.js" error is produced with toolbar button was pressed! It worked only when installed with unopkg and then disable-enable workaround in GUI extension manager (thanks to bmarcelly) for the workaround. But, such long way of installation is cumbersome to end users. I've downloaded ooo 3.1.0rc2 and the problem is still unresolved. The extension works only after installing from command line with unopkg AND pressing "disable"/"enable" button twice in extension manager. I don't want to put another comment, but the general javascript execution speed is not very fast, too. Especially comparing to Firefox 3.5 with TraceMonkey enabled. It would be a good idea to adapt such fast Javascript engine to the OpenOffice. Needs evaluation, STARTED, 3.x for now Can't reproduce anymore on Apache OpenOffice 4.0.1. All Java-like scripts work after extension installation. I close as RESOLVED. |