Hi Gergő
On 29/05/13 15:16, Gergő Mocsi wrote:
Hello Everyone,
I'm very excited to do this task in GSOC 2013. My name is Gergő Mocsi
and Iám a student ant Eötvös Loránd University in Budapest, Hungary.
Here's what I've alredy figured out:
Congratulations on being accepted, we are delighted that you are going
to be working on this project, I am particularly excited and looking
forward to working with you on this project !!!!
the problem in BASIC language is that it can handle only Object type,
and other can be created with createUnoService(...) etc. First, I have
to add support to the other type. Here is an example how I wan to do this:
Dim filepicker As Object
filepicker = createUnoService("com.sun.star.ui.dialogs.FilePicker")
these two lines create a FilePicker that will show up. Later can be
used like this:
filepicker.setDisplayDirectory(".")
filepicker.Title = title
filepicker.execute()
files = filepicker.getFiles()
This code sets the display directory and title of the filepicker, and
the execute() method shows it. After that, we get back the selected file.
So, if we had a FilePicker type in BASIC, we could do the code
completition (beacuse the IDE doesn't know the type, ONLY when
executed the code).
So, I'd like to implement these types to BASIC language and it would
look like this:
eg. Dim filepicker as com.sun.star.ui.dialogs.FilePicker
I think you are on the right track :-) However you are jumping forward a
number of steps :-)) ( and I like small manageable steps that my puny
brain can process )
Also I think we need to distinguish between defining an object as a
certain type and additionally defining an 'instance' of that type
so... something like
a) Dim filepicker as new com.sun.star.ui.dialogs.FilePicker ' to declare
a variable pointing to a new instance
b) Dim filepicker as com.sun.star.ui.dialogs.FilePicker ' for just
declaring a variable
but... "com.sun.star.ui.dialogs.FilePicker" is a service and not a type
( and currently there is no afaik way to get the primary interface
associated with a service from a service name )
But I like your idea and when the bones of the support is in place I
think we can think about some shortcuts and possibly getting some
information in the registry that would allow what you suggest to be possible
Personally though I think we need to start with b) it is sort of the
'base' usage, so.. something like
Dim filepicker as com.sun.star.ui.dialogs.XFilePicker3
and yes the above is quite a mouthful ( but.. for a further step we
could introduce some namespace magic ) and get
Dim filepicker as ui.dialogs.XFilePicker3
or even
Dim filepicker as XFilePicker3
(and eventually with some help from a tweaked registry )
Dim filepicker as FilePicker '( which basic would understand and Dim
filepicker as com.sun.star.ui.dialogs.XFilePicker3 )
But... lets talk about this maybe tomorrow, we should meet up in anycase
to just even say hello. I will try to write some very rough ideas of
where to start with this, we can then discuss that in some more detail
Once again, congratulations and welcome
Noel
ps. good choice of example
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.