Thank you so much andre, I will see if we can use this!
mike

On Wed, Oct 9, 2013 at 7:42 AM, Andre Fischer <awf....@gmail.com> wrote:
> On 03.10.2013 11:37, Jörg Schmidt wrote:
>>
>> Hello,
>>
>>> From: Andre Fischer [mailto:awf....@gmail.com]
>>>>
>>>> It took a long time but here is my example, a simple search
>>>
>>> for writer.
>>>
>>> That's OK.  I just came back from my vacation and am now
>>> catching up on
>>> emails.
>>>
>>>> Can you please help me now?
>>>
>>> I will try.  Can you tell me, what the extension does and how
>>> you want
>>> it to work and look?
>>
>> The extension function is very simple, there is a dialog with two text
>> fields to
>> enter a search string and a replacement text, and two buttons to start
>> searching
>> or replacing. The extension is for writer.
>>
>> So not much function but it is indeed primarily an example of integration
>> in the
>> sidebar
>>
>> This dialogue should now be implemented, he works as a sidebar, so:
>>
>> 2 text fields for entering
>> 4 Label Fields
>> 2 buttons to launch two Basic Macros
>>
>
> I was somewhat but not entirely successful in turning your BASIC script into
> a sidebar panel.
>
> I have created an Eclipse project of the sidebar panel [1].   Run the 'oxt'
> target of the Ant build file to create the file SidebarBasicPanelDemo.oxt in
> the dist/ directory.   Install this extension in a 4.* OpenOffice and
> restart.  Now you should see in the sidebar tab bar a new entry with a gear
> icon.  Click on it to swtich to the demo panel.
>
> What works is that the dialog is displayed as expected.  Callbacks into the
> BASIC script work also.
>
> What does not work is that the BASIC script can not access the dialog for eg
> retrieval of the search strings.  The reason for that is that the dialog is
> not created from the script in the 'Start_dialog' function but on the Java
> side of the implementation. I tried to call from Java into BASIC with the
> dialog object.  The call works, but I did not get the public BASIC variable
> 'ts_dialog' to work.  When you click on the 'Suche Nächsten' button then the
> ts_dialog value is empty again.
>
> But maybe this is a good thing, because every document has its own side bar
> and its own BASIC dialog.  Using a single global variable to hold the dialog
> would not work.  As I do not know OpenOffice BASIC well enough to know if
> and how object orientation works, I did not try to fix this.
> I also do not know how to change the event callbacks to pass parameters to
> the BASIC script.  Without parameters, your BASIC script does not know from
> which instance of the dialog it has been called and thus could not retrieve
> the search string, even if it could access the dialogs.
>
> Using the BASIC dialog but do the implementation in Java would be much
> easier and more reliable.
>
> Best regards,
>
> Andre
>
>
> [1] http://people.apache.org/~af/SidebarBasicDemo.zip
>
>
>>
>> Greetings,
>> Jörg
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
>> For additional commands, e-mail: dev-h...@openoffice.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
> For additional commands, e-mail: dev-h...@openoffice.apache.org
>



-- 
James Michael DuPont
Member of Free Libre Open Source Software Kosova http://flossk.org
Saving wikipedia(tm) articles from deletion http://SpeedyDeletion.wikia.com
Contributor FOSM, the CC-BY-SA map of the world http://fosm.org
Mozilla Rep https://reps.mozilla.org/u/h4ck3rm1k3
Free Software Foundation Europe Fellow http://fsfe.org/support/?h4ck3rm1k3

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to