Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing
|Summary:||CreateUnoDialog returns Null when Dialog/s running from other odb file at the same time|
|Component:||code||Assignee:||AOO issues mailing list <issues>|
|Status:||ACCEPTED ---||QA Contact:|
|Priority:||P3||CC:||drewjensen.inbox, issues, oliver.brinzing|
|Version:||OOo 3.2 RC5|
|Issue Type:||DEFECT||Latest Confirmation in:||---|
Description cascabel 2010-02-07 17:52:40 UTC
OS: Windows XP SP3 OOo 3.2 Release Candidate 5 Keep two odb files opened at the same time with Base. Execute a basic macro (e.g. from a button) from the first odb to open a dialog with ExecuteDialog. The dialog acts as expected. Do not close nor dispose the dialog. Try to open some other dialog from the same odb file. It works. Try to open any dialog from the second odb file while any dialogs in the first odb are still running. Result: ExecuteDialog returns Null and the dialog fails to open. Expected: ExecuteDialog should return the controller and the dialog should open. If you close and dispose all dialogs in the first odb file, then dialogs open and run normally from the second file.
Comment 1 cascabel 2010-02-07 18:27:14 UTC
Created attachment 67696 [details] Sample odb file opening a dialog from a macro.
Comment 2 cascabel 2010-02-07 18:28:43 UTC
Created attachment 67697 [details] Same as Dialog1.odb, different names on forms, libraries and dialogs.
Comment 3 cascabel 2010-02-07 18:30:04 UTC
Oops, I mean CreateUnoDialog instead of ExecuteDialog. Sorry. Can someone, please, edit the summary? Attached two sample files.
Comment 4 marc.neumann 2010-02-08 13:20:08 UTC
confirm , set target and send to the right developer. As far as I know this is not possible yet, because there is only one basic running. So when the second library should be loaded the basic is still running and can't load a second library. @fs: is this right?
Comment 5 Oliver Brinzing 2010-02-08 17:25:32 UTC
i can report a similar problem (maybe the same roo cause ?): scenario: - a documents push button's "Execute action" is connected via script dispatching framework to java code. - if button is pressed, the java code will be executed. - the java code does something and at the end dispatches a pice of basic code to create a basic dialog (the basic code and dialog are inside the document) - result: CreateUnoDialog is null
Comment 6 Frank Schönheit 2010-02-17 22:19:18 UTC
Created attachment 67889 [details] text document (1) showing the same problem
Comment 7 Frank Schönheit 2010-02-17 22:19:43 UTC
Created attachment 67890 [details] text document (2) showing the same problem
Comment 8 Frank Schönheit 2010-02-17 22:21:21 UTC
can reproduce the same problem with text documents - see the two attached files fs->ab: Somehow it seems that CreateUnoDialog, when invoked for a dialog in document 2, while a dialog in document 1 is still open, does return null only. (not sure "OOo Later" is justified here - I'd put a 3.x on it, normally.)
Comment 9 ab 2010-05-28 11:12:11 UTC
Without having this evaluated in depth so far I think msc is right. As soon as one Dialog has been executed the Basic runtime stays on the stack while the dialog's message loop is running. So trying to create another Dialog is done with the same Basic runtime on top of the old Basic stack, but probably not with the same C++ stack. I would have been surprised if this has worked without problems. Enabling Basic to run multiple independent threads would be a real- ly tough task that I don't see to be finished or even started soon. So OOo Later may not be satisfying but it's realistic. STARTED
Comment 10 lmerger 2011-02-22 12:58:02 UTC
I think the following is related to that issue : you have two calc documents both documents do contain dialogboxes, but in that test case, do not open any dialog from the first one. so, from the first one, you call a macro by a ScriptProvider (or a dispatcher!) located into the second document. That macro aims to open up a Dialogbox... > that doesn't work at all : CreateUnoDialog returns Null ( On the contrary, if you keep opened the first document and, on the meanwile, you call the document by a shell (ex: "C:\Program Files\OpenOffice.org 3\program\soffice.exe" "C:\Documents and Settings\xxx\Bureau\Reportal\reportal.ods" "macro://Reportal/Standard.Module1.main"), then it works )
Comment 11 lmerger 2011-02-22 13:13:17 UTC
please, edit the component with Basic (if you agree with that)