[Solved] Troubleshooting Addon UI Elements

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
hanya
Volunteer
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Troubleshooting Addon UI Elements

Post by hanya »

... read reference.
I found your registration part of your python script does not have services to register, it gave me an error during installation of your package.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
User avatar
twohot
Posts: 60
Joined: Wed Feb 17, 2010 2:22 pm

Re: Troubleshooting Addon UI Elements

Post by twohot »

Strange. Must a service be registered? I thought implementation name is indispensable and the later is optional. I have seen examples without the services listed. I'm wondering what service I can claim that snippet provides ... job? I don't get errors here when installing but I notice that only the first line in the 'modified' method executes. Anything afterwards is just ignored. Very strange.
LibreOffice 4.3.0.3 on Fedora Rawhide
hanya
Volunteer
Posts: 885
Joined: Fri Nov 23, 2007 9:27 am
Location: Japan

Re: Troubleshooting Addon UI Elements

Post by hanya »

I don't get errors here when installing
I could seen the error on OOo 3.3 and LO 3.3.2 but LO 3.4.2 did not raise the error.
Please, edit this thread's initial post and add "[Solved]" to the subject line if your problem has been solved.
Apache OpenOffice 4-dev on Xubuntu 14.04
User avatar
twohot
Posts: 60
Joined: Wed Feb 17, 2010 2:22 pm

Re: Troubleshooting Addon UI Elements

Post by twohot »

Hi

I FIXED IT! :D Yay! I'm so happy. So what went wrong?

As far as I can tell, mine was a scope problem. I added the service rendered by the script/extension -- though the result isn't obvious to me. LibO 3.4 didn't complain about its absence. In any case, its done. I found that the listener worked, as long as I wasn't trying to access other sheets or cells in the attached document from within the Listener method. The full version of my extension needed to alter sheets and cells when a change happens on the Listener's Cell. I got nothing :shock:

So I figured I had to pass the Doc to the listener or derive the Doc via the Listener cell (by backtracking to the document controller starting from the event Source ... now this is hypothetical, I wonder if that's even possible). The first option worked, I didn't bother to try the second. I have attached the updated version of used.oxt (just a demo). However, there is one observation. The extension runs much faster in Windows than in Linux. For me, this is bad news because I am on Linux 90-99% of the time.
Attachments
used.oxt
(3.75 KiB) Downloaded 201 times
LibreOffice 4.3.0.3 on Fedora Rawhide
Post Reply