| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> |
| <HTML> |
| <head> |
| <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1"> |
| <TITLE>FAQ</TITLE> |
| <META NAME="GENERATOR" CONTENT="StarOffice 6.1 EA2 (Solaris Sparc)"> |
| <META NAME="CREATED" CONTENT="20021203;15313500"> |
| <META NAME="CHANGED" CONTENT="20021203;17425800"> |
| </head> |
| <body LANG="en-US"> |
| <H1><A NAME="top"></A>Frequently Asked Questions for the Office |
| Scripting Framework</H1> |
| <H2>Questions</H2> |
| <OL> |
| <LI><P STYLE="margin-bottom: 0cm"><A HREF="#1">Why can't I see the |
| script I deployed to a document from the [Assign Script] dialog?</A> |
| </P> |
| <LI><P STYLE="margin-bottom: 0cm"><A HREF="#2">Why can't I bind |
| scripts to events?</A> |
| </P> |
| <LI><P STYLE="margin-bottom: 0cm"><A HREF="#3">I have removed the |
| examples provided with the Script Framework installation and |
| installed my own but the script in ExampleSpreadSheet.sxc still |
| works. Why?</A> |
| </P> |
| <LI><P STYLE="margin-bottom: 0cm"><A HREF="#4">How can I store menu |
| or key bindings for scripting in a document?</A> |
| </P> |
| <LI><P STYLE="margin-bottom: 0cm"><A HREF="#5">Why is there a delay |
| in starting the first script?</A> |
| </P> |
| <LI><P><A HREF="#6">Why do I have to use one dialog to work with |
| StarBasic macros [Tools/ Configure] and another to work with my new |
| Java scripts [Assign Script...]?</A> |
| </P> |
| </OL> |
| <H2>Answers</H2> |
| <OL> |
| <LI><P><A NAME="1"></A>Why can't I see the script I deployed to a |
| document from the [Assign Script] dialog? |
| </P> |
| <P>Currently, the [Assign Script] dialog only displays scripts |
| located in the user area (also, the IDE only supports deployment to |
| document and user area). This will be fixed in the next release. |
| </P> |
| <P><B>Workaround:</B> To bind to scripts deployed in the application |
| share area you can hand edit the appropriate (app)keybinding.xml or |
| (app)menubinding.xml file located in the /user/config/soffice.cfg/ |
| directory. Changes to these files require a restart of the |
| application to take effect. |
| </P> |
| <P STYLE="margin-bottom: 0cm"><A HREF="#top">Top</A> |
| </P> |
| <LI><P><A NAME="2"></A>Why can't I bind scripts to events? |
| </P> |
| <P>This is the first release of the scripting framework, some work |
| is still needed in the office source in order to support scripting |
| fully. In particular the way events are handled is different to how |
| menu and keybindings are handled and currently we cannot support |
| event bindings. It is our intention to add this functionality in the |
| future. |
| </P> |
| <P STYLE="margin-bottom: 0cm"><A HREF="#top">Top</A> |
| </P> |
| <LI><P><A NAME="3"></A>I have removed the examples provided with the |
| Script Framework installation and installed my own but the script in |
| ExampleSpreadSheet.sxc still works. Why? |
| </P> |
| <P>Both the script and the Key bindings are contained in the |
| document itself, at the moment the [Assign Script] dialog does not |
| display scripts or bindings stored in documents. |
| </P> |
| <P STYLE="margin-bottom: 0cm"><A HREF="#top">Top</A> |
| </P> |
| <LI><P><A NAME="4"></A>How can I store a script, menu or key |
| bindings for scripting in a document? |
| </P> |
| <P STYLE="margin-bottom: 0cm">To store bindings in document follow |
| the steps below; |
| </P> |
| <UL> |
| <LI><P STYLE="margin-bottom: 0cm">Use the IDE deploy the Script to |
| the user area as well as to the document. |
| </P> |
| <LI><P STYLE="margin-bottom: 0cm">Create the binding (key or menu) |
| as normal using the [Assign Script] dialog to the user script which |
| matches that in the document. |
| </P> |
| <LI><P STYLE="margin-bottom: 0cm">Restart office. |
| </P> |
| <LI><P STYLE="margin-bottom: 0cm">Select [Configure] from the |
| [Tools] menu, select the appropriate tab (Keyboard or Menu). Click |
| on the save button and select the document you wish to save the |
| bindings to.</P> |
| <LI><P STYLE="margin-bottom: 0cm">Due to an issue with deploying to |
| document from an ide a couple of extra manual steps are needed. |
| </P> |
| <UL> |
| <LI><P STYLE="margin-bottom: 0cm">You need to extract the |
| parcel-descriptor file from the document you deployed to. |
| </P> |
| <UL> |
| <LI><P STYLE="margin-bottom: 0cm">On Solaris/Linux the command |
| is:</P> |
| <P STYLE="margin-bottom: 0cm">unzip <path to document> |
| Scripts/java/<ParcelName>/parcel-descriptor.xml</P> |
| <LI><P STYLE="margin-bottom: 0cm">On Windows refer to user doc of |
| the Zip/Unzip utility of your choice [ e.g. <A HREF="http://www.pkware.com/">PKUnzip</A> |
| and <A HREF="http://www.winzip.com/">WinZip</A> ].</P> |
| </UL> |
| <LI><P STYLE="margin-bottom: 0cm">Edit the parcel-descriptor.xml |
| file you have extracted and modify the line:</P> |
| <P STYLE="margin-bottom: 0cm"><prop name="classpath" |
| value="."/>” to be <prop name="classpath" |
| value=""/></P> |
| <LI><P STYLE="margin-bottom: 0cm">Save the updates.</P> |
| <LI><P STYLE="margin-bottom: 0cm">Update the document with the |
| “parcel-descriptor.xml” you have just modified</P> |
| <UL> |
| <LI><P STYLE="margin-bottom: 0cm">On Solaris/Linux use: |
| </P> |
| <P STYLE="margin-bottom: 0cm">zip <path to document> |
| Scripts/java/<ParcelName>/parcel-descriptor.xml</P> |
| <LI><P STYLE="margin-bottom: 0cm">On windows refer to the user |
| documentation for your Zip/unZip utility on how to update files |
| in an archive.</P> |
| </UL> |
| </UL> |
| </UL> |
| <P>You now have a key or menu binding for this script stored in the |
| document along with the script. The ability to add document bindings |
| directly will be added in the future. |
| </P> |
| <P STYLE="margin-bottom: 0cm"><A HREF="#top">Top</A> |
| </P> |
| <LI><P><A NAME="5"></A>Why is there a delay in starting the first |
| script? |
| </P> |
| <P>The delay is caused by the startup of the inprocess JVM by |
| office. |
| </P> |
| <P STYLE="margin-bottom: 0cm"><A HREF="#top">Top</A> |
| </P> |
| <LI><P><A NAME="6"></A>Why do I have to use one dialog to work with |
| StarBasic macros [Tools/ Configure] and another to work with my new |
| Java scripts [Assign Script...]? |
| </P> |
| <P>The StarBasic macros are completely separate from and do not use |
| the Scripting Framework. As such they use their own configuration |
| and settings dialogs. In the future the Scripting Framework and |
| StarBasic dialogs will be integrated so users have one consistnet |
| way of working with macros/ scripts, regardless of which language |
| they have been written it. |
| </P> |
| <P><A HREF="#top">Top</A> |
| </P> |
| </OL> |
| <HR> |
| <P>Last Modified: Fri Nov 29 15:18:53 GMT 2002 |
| </P> |
| </body> |
| </HTML> |