[api-dev] where is my addon installed?

2005-12-15 Thread Daniel Naber
Hi, my addon (see http://www.danielnaber.de/languagetool/ for the base package, no OOo integration online yet) needs to know where it has been installed to load some external files that are part of its ZIP. I actually got this working in a different context (see http://api.openoffice.org/s

Re: [api-dev] where is my addon installed?

2005-12-16 Thread Daniel Naber
On Freitag 16 Dezember 2005 15:16, Stephan Bergmann wrote: > The above mechanism is unreliable and should not be used: > ClassLoader.getResource "will first search the parent class loader for > the resource" (see the Sun Java documentation), so if some parent class > loader happens to find another

Re: [api-dev] where is my addon installed?

2005-12-17 Thread Daniel Naber
On Freitag 16 Dezember 2005 13:37, Daniel Boelzle wrote: > but I also suggest to play around with the class loader > resource mechanism, e.g. > > java.net.URL url = >     MyClassFromMyJar.class.getResource("some-file-in-my.jar"); > > to obtain an url at runtime. Thanks, it worked. The new version

[api-dev] iterating over text

2006-10-15 Thread Daniel Naber
Hi, I posted this on oooforum.org already (http://www.oooforum.org/forum/viewtopic.phtml?t=44933) but it wasn't completly solved, so I need to try here again. [...] The next problem is that I need to get the text and check it, then navigate to given positions and select them (this is for my gr

Re: [api-dev] iterating over text

2006-10-19 Thread Daniel Naber
On Monday 16 October 2006 08:03, Mathias Bauer wrote: > I can't help with your problem, I only wanted to ask wether it is an > option for you to wait for our new Grammar Checking API that will not > require any text iteration from inside the Grammar Checker as it always > gets plain text as a sour

[api-dev] create a modal JDialog

2006-11-09 Thread Daniel Naber
Hi, I'd like to create a Java dialog that's modal, i.e. that is always on top of my Writer window. Currently my code is this: dialog = new JDialog(); dialog.setModal(true); But that dialog isn't modal, probably because it doesn't know its parent/owner. I'd like to use the following constructor