Oops, sorry. I did it again, I accidentally replied privately rather than
to the list. I'm sorry for that, Robert.
---------- Forwarded message ----------
From: Johnny Rosenberg <gurus.knugum@gmail.com>
Date: 2017-11-19 23:19 GMT+01:00
Subject: Re: [libreoffice-users] Macro Dim Dialog and Control
To: Robert Großkopf <robert@familiegrosskopf.de>
2017-11-19 20:00 GMT+01:00 Robert Großkopf <robert@familiegrosskopf.de>:
Hi Jonny,
This works, but what about oDlg and oCtl? Are there special data types
for
them too? The documentation I've found so far doesn't give any hints at
all. I tried this:
Dim Dlg As com.sun.star.awt.XDialog ' No error here,
' but next line throws an error:
oDlg = CreateUnoDialog(DialogLibraries.Standard.MyDialogue)
' Error: No access to object.
' Invalid usage of the object.
' Well, something like that, it's actually in Swedish.
What is the name of the dialog? Is ist called "MyDialogue"?.
No, I actually faked it for this mailing list. The real name is in Swedish,
so I figured it would be easier for you guys if I picked an English name
instead, just for this example. But the name isn't the problem anyway. My
question is if there is an ”extended data type” for dialogs and controls,
just like there is for sheets (com.sun.star.sheet.XSpreadsheet) and cells (
com.sun.star.table.XCell). I searched for and while and thought that
com.sun.star.awt.XDialog could be it for dialogs, but as I said, I got that
error message. When I used Object, like you do below, everything worked for
me too, but my question wasn't about getting it working, it was if there is
such a data type. I'm not doing anything particular, I'm just trying to
learn this new stuff about those ”new data types”, that I enable by
selecting Tools → Options… → LibreOffice → Advanced → Activate experimental
features, then restart LibreOffice, then Tools → Options… → LibreOffice →
Basic IDE options → ☒ Use extended data types (give or take some words or
phrases, since this is a translation from Swedish).
When trying to get information I found this page:
https://help.libreoffice.org/Common/Basic_IDE_Options#Use_extended_types
However, they only provided two examples of those new data types (the two I
mention above), and there's no link or anything that points to the rest of
them, so it's pretty useless, unfortunately.
It should
appear at the left (catalog of objects - don't konwo if this is the
right name ..) and at the bottom (like the standard "Module1")
Declare the dialog first, out of a sub:
DIM oDialog0 AS OBJECT
Start the dialog:
SUB Dialog0Start
DialogLibraries.LoadLibrary("Standard")
oDialog0 = createUnoDialog(DialogLibraries.Standard.Dialog0)
oDialog0.Execute()
END SUB
Name of the dialog is "Dialog0"
End the dialog:
SUB Dialog0Ende
oDialog0.EndExecute()
END SUB
Yes, that's how I used to do it, and it usually work for me too, but this
wasn't what I asked about. My question is about those new data types,
mentioned on the page I referred to above.
I'm sorry for my confusing English, which obviously isn't my native
language.
Thanks for replying, though! :)
Kind regards
Johnny Rosenberg
Regards
Robert
--
Homepage: http://robert.familiegrosskopf.de
LibreOffice Community: http://robert.familiegrosskopf.de/map_3
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-un
subscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be
deleted
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.