[api-dev] Pre-recorded Macro Suddenly Crashing

2011-06-16 Thread Hal Vaughan
I've been using this macro for a good while: sub CharacterName Dim oDoc As Object Dim oDispatch As Object BasicLibraries.LoadLibrary("HalLib") HalLib.AutoTextMacro.InsertAutoMacroText() Margin4() ' MsgBox "Debug 1" oDoc = ThisComponent.Curren

[api-dev] Re: Displaying Multiple Dialogs from BASIC

2011-06-16 Thread Hal Vaughan
Thanks! Okay, I'll check for typos and other possible mess-ups. Hal On Jun 16, 2011, at 5:28 AM, Fernand Vanrie wrote: > Hal , > > when using a Listner the Listener subroutine is called with a "EventObject" > the EventObject.source is the ButtonControl > the EventObject.source.context is the

[api-dev] Re: Displaying Multiple Dialogs from BASIC

2011-06-16 Thread Fernand Vanrie
Hal , when using a Listner the Listener subroutine is called with a "EventObject" the EventObject.source is the ButtonControl the EventObject.source.context is the DialogControl oDialogControl = oEvent.source.context On Jun 16, 2011, at 4:59 AM, Fernand Vanrie wrote: On 16/06/2011 10:20, H

[api-dev] Re: Displaying Multiple Dialogs from BASIC

2011-06-16 Thread Hal Vaughan
On Jun 16, 2011, at 4:59 AM, Fernand Vanrie wrote: > On 16/06/2011 10:20, Hal Vaughan wrote: >> This leads to a couple other questions: >> >> 1) On the CloseDialog() subroutine, if I want to execute it from a button in >> the dialog, how can I pass the dialog itself to the routine? > you can ad

[api-dev] Re: Displaying Multiple Dialogs from BASIC

2011-06-16 Thread Mathias Bauer
On 16.06.2011 09:22, Hal Vaughan wrote: I've mentioned the sticky-note project I'm working on yesterday in two emails. Now I'm running into a problem: I'd like to display a number of sticky-notes, but to display any kind of dialog in BASIC, I need to do something like this: oSticky = c

[api-dev] Re: Displaying Multiple Dialogs from BASIC

2011-06-16 Thread Fernand Vanrie
On 16/06/2011 09:52, Hal Vaughan wrote: On Jun 16, 2011, at 3:30 AM, Fernand Vanrie wrote: Hal , Y ou can set a Dialogcontrol visible or not , but we need a timeloop to keep it visible Am I right, then, in assuming that the time loop is there because once that particular instance of the scr

[api-dev] Re: Displaying Multiple Dialogs from BASIC

2011-06-16 Thread Fernand Vanrie
On 16/06/2011 10:20, Hal Vaughan wrote: This leads to a couple other questions: 1) On the CloseDialog() subroutine, if I want to execute it from a button in the dialog, how can I pass the dialog itself to the routine? you can add a listener to the button (using code) or manualy using the GUI t

[api-dev] Re: Displaying Multiple Dialogs from BASIC

2011-06-16 Thread Hal Vaughan
This leads to a couple other questions: 1) On the CloseDialog() subroutine, if I want to execute it from a button in the dialog, how can I pass the dialog itself to the routine? 2) Is there any way to run a macro when the "X" on the title bar of the dialog is clicked? Thanks! Hal On Jun 16

[api-dev] Re: Displaying Multiple Dialogs from BASIC

2011-06-16 Thread Hal Vaughan
On Jun 16, 2011, at 3:30 AM, Fernand Vanrie wrote: > Hal , > > Y ou can set a Dialogcontrol visible or not , but we need a timeloop to keep > it visible Am I right, then, in assuming that the time loop is there because once that particular instance of the script terminates, the dialog automat

[api-dev] Re: Adding Items to a Sub-Menu

2011-06-16 Thread Hal Vaughan
I kind of had to drop the idea of displaying the note titles in the menu for a number of reasons. Thanks, anyway! Hal On Jun 15, 2011, at 2:10 PM, Oliver Brinzing wrote: > Hi Hal, > >> From what I remember, to add things to a sub menu, I have to do that by >> hand. >> Am I wrong? Is the

[api-dev] Re: Displaying Multiple Dialogs from BASIC

2011-06-16 Thread Fernand Vanrie
Hal , Y ou can set a Dialogcontrol visible or not , but we need a timeloop to keep it visible i use 2 sub's for open and closing Sub Opendialog bEnd = false oDialogcontrol.setvisible(true) Do Wait 100 ' keep computer running (should use "wait for key event" if existed) Loop while not bEnd

[api-dev] Displaying Multiple Dialogs from BASIC

2011-06-16 Thread Hal Vaughan
I've mentioned the sticky-note project I'm working on yesterday in two emails. Now I'm running into a problem: I'd like to display a number of sticky-notes, but to display any kind of dialog in BASIC, I need to do something like this: oSticky = createUnoDialog(DialogLibraries.HalLib.Stic

[api-dev] Re: Adding Items to a Sub-Menu

2011-06-16 Thread Fernand Vanrie
Ariel, The stuff you did with a dialog's an menu's inside, could be a alternative in basic ? the examples made by Ariel i found here Hope it helps Fernand Hello Hal, On Wednesday 15 June 2011, 02:05, H