Sorry, using my phone for this... And off the top of my head... Each object usually supports multiple interfaces...
In basic, the actual type does not matter. Names starting with an x refer to an interface. I need to look it up, but I think that the preference was a variant rather than object, but... It may no longer matter The developer who told me this could not remember why it when it mattered And I only had a problem because of it once, and that was years ago. Other languages, like Java, it matters. I'd we had a smarter IDE it might be useful to declare the actual type. Sent from BlueMail On Nov 19, 2017, 5:31 PM, at 5:31 PM, Johnny Rosenberg <gurus.knu...@gmail.com> wrote: >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.knu...@gmail.com> >Date: 2017-11-19 23:19 GMT+01:00 >Subject: Re: [libreoffice-users] Macro Dim Dialog and Control >To: Robert Großkopf <rob...@familiegrosskopf.de> > > >2017-11-19 20:00 GMT+01:00 Robert Großkopf ><rob...@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+unsubscr...@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+unsubscr...@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 -- To unsubscribe e-mail to: users+unsubscr...@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