|
List Info
Thread: UNO Component Communicating with Boostrapped Code
|
|
| UNO Component Communicating with
Boostrapped Code |

|
2006-10-22 15:21:36 |
Hi,
I need to do the following:
1. run a server in java
2. bootstrap ooimpress from the same class which started the
above server
3. from within ooimpress either a UNO Component or Macro
(which will both be
in java ) call function on this server.
I've reviewed chapter 4 of the deverlopers guide, up till
now I undestand
two things one is how to write a user-interface based UNO
Component and the
other how to boostrap openoffice in java but I'm unable to
communicate
between these two.
Please help.
|
|
| UNO Component Communicating with
Boostrapped Code |

|
2006-10-23 05:21:47 |
Hi Tabish,
> 1. run a server in java
> 2. bootstrap ooimpress from the same class which
started the above server
> 3. from within ooimpress either a UNO Component or
Macro (which will
> both be
> in java ) call function on this server.
>
> I've reviewed chapter 4 of the deverlopers guide, up
till now I undestand
> two things one is how to write a user-interface based
UNO Component and the
> other how to boostrap openoffice in java but I'm unable
to communicate
> between these two.
First of all, have a look at the snippet base:
http://codesnippets.services.openoffice.org/Office/j
ava.xml.
Second, we need to know what you exactly want to do. If you
just want to
send a message from one class to an other, it would be an
Java issue an
this would be the wrong place to ask for. But if your Java
sould
manipulate OpenOffice, continue to give us some more info.
Greetings, Tobias
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| UNO Component Communicating with
Boostrapped Code |

|
2006-10-23 05:37:49 |
I'm familiar with the code snippets already.
This is not a java issue.
Let me explain it again:
There is a piece of code which boot strapped openoffice:
class Test
{
// I bootstrapped openoffice here after this code
execution, ooimpress has
been opened
void foo()
{}
}
Now while running ooimpress during the slideshow I have a
button on every
slide. When I click that button, that button should go &
execute Test.foo().
The problem is how do I access this class ?
In other words ooimpress has sort of hidden that class from
me now.
On 10/23/06, Tobias Krais <tuxmail-spam bats.ch> wrote:
>
> Hi Tabish,
>
> > 1. run a server in java
> > 2. bootstrap ooimpress from the same class which
started the above
> server
> > 3. from within ooimpress either a UNO Component or
Macro (which will
> > both be
> > in java ) call function on this server.
> >
> > I've reviewed chapter 4 of the deverlopers guide,
up till now I
> undestand
> > two things one is how to write a user-interface
based UNO Component and
> the
> > other how to boostrap openoffice in java but I'm
unable to communicate
> > between these two.
>
> First of all, have a look at the snippet base:
> http://codesnippets.services.openoffice.org/Office/j
ava.xml.
>
> Second, we need to know what you exactly want to do. If
you just want to
> send a message from one class to an other, it would be
an Java issue an
> this would be the wrong place to ask for. But if your
Java sould
> manipulate OpenOffice, continue to give us some more
info.
>
> Greetings, Tobias
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> For additional commands, e-mail: dev-help api.openoffice.org
>
>
|
|
| UNO Component Communicating with
Boostrapped Code |

|
2006-10-23 05:46:03 |
Hi Tabish,
thanks for your information. Now your target is clear to me.
> There is a piece of code which boot strapped
openoffice:
>
> class Test
> {
>
> // I bootstrapped openoffice here after this code
execution, ooimpress has
> been opened
>
> void foo()
> {}
> }
>
> Now while running ooimpress during the slideshow I have
a button on every
> slide. When I click that button, that button should go
& execute
> Test.foo().
>
> The problem is how do I access this class ?
you have to write an OpenOffice plugin for this. Before
OpenOffice 2.0.4
this page can be useful:
http://kingyo.tutms.tut.ac.jp/~toshi/StarSuite/Chap4/,
especially
http://kingyo.tutms.tut.ac.jp/~toshi/StarSuite/Chap4
/EX4711/
Since OOo 2.0.4 you can write Plugins. But I did not find
(OK, I did not
use much time on searching) a useful howto for this. all, can
somebody
advice us a Plugin howto?
Greetings, Tobias
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| UNO Component Communicating with
Boostrapped Code |

|
2006-10-23 05:59:57 |
I searched alot but there isn't any support available on the
internet
regarding this issue.
What do you mean by an OpenOffice plugin ?
I understand what is a UNO Component.
Also I read on the ProtocolHandler & Jobs approach but I
couldn't figure out
much how do they fit in with my problem.
On 10/23/06, Tobias Krais <tuxmail-spam bats.ch> wrote:
>
> Hi Tabish,
>
> thanks for your information. Now your target is clear
to me.
>
> > There is a piece of code which boot strapped
openoffice:
> >
> > class Test
> > {
> >
> > // I bootstrapped openoffice here after this code
execution, ooimpress
> has
> > been opened
> >
> > void foo()
> > {}
> > }
> >
> > Now while running ooimpress during the slideshow I
have a button on
> every
> > slide. When I click that button, that button
should go & execute
> > Test.foo().
> >
> > The problem is how do I access this class ?
>
> you have to write an OpenOffice plugin for this. Before
OpenOffice 2.0.4
> this page can be useful:
> http://kingyo.tutms.tut.ac.jp/~toshi/StarSuite/Chap4/,
especially
> http://kingyo.tutms.tut.ac.jp/~toshi/StarSuite/Chap4
/EX4711/
>
> Since OOo 2.0.4 you can write Plugins. But I did not
find (OK, I did not
> use much time on searching) a useful howto for this.
all,
can somebody
> advice us a Plugin howto?
>
> Greetings, Tobias
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> For additional commands, e-mail: dev-help api.openoffice.org
>
>
|
|
| UNO Component Communicating with
Boostrapped Code |

|
2006-10-23 06:37:57 |
Hi Tabish,
> I searched alot but there isn't any support available
on the internet
> regarding this issue.
>
> What do you mean by an OpenOffice plugin ?
Please see
http://marketing.openoffice.org/ooocon
2006/presentations/wednesday_d10.pdf
esp. pages 7 and following.
> Also I read on the ProtocolHandler & Jobs approach
but I couldn't figure
> out much how do they fit in with my problem.
It serves your problem fully. I had the same problem some
months ago and
tried to find a different solution. But that was wasted
time...
Greetings, Tobias
P.S.: May I advice you this page for correct quoting, too:
http:
//www.netmeister.org/news/learn2quote.html
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| UNO Component Communicating with
Boostrapped Code |

|
2006-10-23 07:19:28 |
Please see
http://marketing.openoffice.org/ooocon
2006/presentations/wednesday_d10.pdf
> esp. pages 7 and following.
Well you can say its a generic name for all kind of ways
available to extend
open office and they have made a new standard for it.
Thats fine. But my initial problem remains
On 10/23/06, Tobias Krais <tuxmail-spam bats.ch> wrote:
>
> Hi Tabish,
>
> > I searched alot but there isn't any support
available on the internet
> > regarding this issue.
> >
> > What do you mean by an OpenOffice plugin ?
>
> Please see
> http://marketing.openoffice.org/ooocon
2006/presentations/wednesday_d10.pdf
> esp. pages 7 and following.
>
> > Also I read on the ProtocolHandler & Jobs
approach but I couldn't figure
> > out much how do they fit in with my problem.
>
> It serves your problem fully. I had the same problem
some months ago and
> tried to find a different solution. But that was wasted
time...
>
> Greetings, Tobias
>
> P.S.: May I advice you this page for correct quoting,
too:
> http:
//www.netmeister.org/news/learn2quote.html
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> For additional commands, e-mail: dev-help api.openoffice.org
>
>
|
|
| UNO Component Communicating with
Boostrapped Code |

|
2006-10-23 10:04:53 |
Hi Tabish,
> Thats fine. But my initial problem remains
>> > Also I read on the ProtocolHandler & Jobs
approach but I couldn't
>> > figure out much how do they fit in with my
problem.
OK, I'll try to give you some more detailed information. You
told me
that you are running a java server you want to connect to.
In what way
does this server offer his service? E.g. it offers its
Service on a
special port. So write a OO plugin that connects to this
server and
interacts with it (e.g. via a TCP Stream).
What you cannot do: you cannot instanciate a Java class of
the server
from that plugin, because the plugin environment does not
find the class.
all
please correct me if I am wrong.
Greetings, tobias
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
| UNO Component Communicating with
Boostrapped Code |

|
2006-10-23 10:22:28 |
OK, I'll try to give you some more detailed information. You
told me
that you are running a java server you want to connect to.
In what way
does this server offer his service? E.g. it offers its
Service on a
special port. So write a OO plugin that connects to this
server and
interacts with it (e.g. via a TCP Stream).
Its a bluetooth server if in any way you are familiar with
bluetooth
technology.
What I want is that I could have an ooimpress plugin which
basically starts
the server when ooimpress is opened. So the way I thought it
should work is
that I start a server in my java code then the same java
code bootstraps
ooimpress and then from there I can communicate from inside
ooimpress to
this server class as I explained it to you earlier.
In no way is my ooimpress a client to this server, rather my
ooimpress
plugin should be a server itself. So basically I'm looking
towards an app
which will have 2 parts:
1. my bluetooth server
2. ooimpress
I need to figure out a way through which both 1 & 2 can
communicate to each
other. 1 calling functions on 2 is straight forward but what
I'm stuck at is
2 calling functions on 1.
What you cannot do: you cannot instanciate a Java class of
the server
from that plugin, because the plugin environment does not
find the class.
Ok let me put it in a more straight forward manner, it may
help you & me
both.
Class Test
{
//I bootstrapped ooimpress here and after execution I
have ooimpress
opened //in front of me
void foo(){}
}
Now from inside a Macro I want to do Test.foo().
Assume the macro is written in Java. I don't know how to do
this. In fact I
don't know even openoffice allows to do such a thing or not.
Do you understand my point now ?
On 10/23/06, Tobias Krais <tuxmail-spam bats.ch> wrote:
>
> Hi Tabish,
>
> > Thats fine. But my initial problem remains
>
> >> > Also I read on the ProtocolHandler &
Jobs approach but I couldn't
> >> > figure out much how do they fit in with
my problem.
>
> OK, I'll try to give you some more detailed
information. You told me
> that you are running a java server you want to connect
to. In what way
> does this server offer his service? E.g. it offers its
Service on a
> special port. So write a OO plugin that connects to
this server and
> interacts with it (e.g. via a TCP Stream).
>
> What you cannot do: you cannot instanciate a Java class
of the server
> from that plugin, because the plugin environment does
not find the class.
>
> all please correct me if I am wrong.
>
> Greetings, tobias
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
> For additional commands, e-mail: dev-help api.openoffice.org
>
>
|
|
| UNO Component Communicating with
Boostrapped Code |

|
2006-10-23 11:06:29 |
Hi Tabish,
your information is very useful to me. But my answer remains
the same:
> So the way I thought it should work is
> that I start a server in my java code then the same
java code bootstraps
> ooimpress and then from there I can communicate from
inside ooimpress to
> this server class as I explained it to you earlier.
OK. Write a java programm as you suggest above. This
programm starts
your server listening on a port. A second thread starts
OOimpress.
> In no way is my ooimpress a client to this server,
rather my ooimpress
> plugin should be a server itself. So basically I'm
looking towards an app
> which will have 2 parts:
> 1. my bluetooth server
> 2. ooimpress
Yes. OOimpress is not a server. An OOimpress plugin is the
client of the
server. Why do you need a plugin?
> Class Test
> {
> //I bootstrapped ooimpress here and after execution
I have ooimpress
> opened //in front of me
>
> void foo(){}
> }
As you wrote, you want to execute server code (Test.foo())
by calling a
macro. OOimpress (or UNO) itself cannot do this. It needs a
plugin...
> Now from inside a Macro I want to do Test.foo().
and Basic macro code can call this plugin.
So communication is that way (bad text based sequence
diagramm):
JavaStarter Server OOimpress
OOimpressPlugin
Start() | | |
----------->listen() |
|
------------------------------->|
|
| |
pressButtonMacro()-------->|
|
|<--------------------------------connect()
|
|isConnected()----------------------->|
|
|<----------------------------ExecuteText.foo()
|
Test.fooExecuted()----------------------->OK|
| | | |
I hope I understood your point and my explanations are clear
(well my
thoughts about your problem are... Otherwise,
continue asking. But I
cannot help you with coding, I only understand something
about concepts.
Greetings, Tobias
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe api.openoffice.org
For additional commands, e-mail: dev-help api.openoffice.org
|
|
|
|