Is the question too general? I really need to get started with this. Can
anyone send me their 'hello world' example?

Richard

-----Original Message-----
From: Richard Pineger [mailto:[EMAIL PROTECTED] 
Sent: 27 May 2008 10:04
To: dev@openoffice.org
Subject: [dev] Help Getting Started

Hi all, { NetBeans, Java }

Can anyone provide a simple example of working code and a brief instruction
on how to use it? I can't find the source code of any of the 'opensource'
extensions.

I can't get past first base with NetBeans, Java and the Developer Guide.
Well, that's not quite true - I can connect to the as follows:

public class OfficeUNOClientApp {
    public OfficeUNOClientApp() {
    }

    public static void main(String[] args) {
        try {
            // get the remote office component context
            XComponentContext xContext = Bootstrap.bootstrap();
            System.out.println("Connected to a running office ...");
            
            XMultiComponentFactory xMCF = xContext.getServiceManager();
            
            String available = (xMCF != null ? "available" : "not
available");
            System.out.println("Remote ServerManager is " + available );
...

But, I'm not great with Java and can't get to the next stage which is the
'useConnection' method as shown in the developer's guide
(http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/FirstSteps/
Example:_Working_with_a_Spreadsheet_Document):

protected void useConnection() { ...

So, this method is full of invalid code. For instance, it repeats the
connection that was made in the static Main class. It misses off the object
types of the statements it makes so NetBeans doesn't recognize them. It uses
an undefined object 'UnoRuntime'. Help!!

Richard



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to