Re: [api-dev] use of css.container.EnumerableMap

2011-01-06 Thread Paolo Mantovani
Il 05/01/2011 12:31, Andreas Bregas ha scritto: [] Problem: This is not very convenient, as the CoreReflection service is needed to get XIdlClass. Probably in most cases the macro program- mer knows in advance which types he wants to use. Each type has a unique name, so it also makes sense to

Re: [api-dev] Enhancing StarBasic then ? (Re: [api-dev] use of css.container.EnumerableMap

2011-01-05 Thread Frank Schönheit
Hi Andreas, > >> Il 21/12/2010 10:25, Frank Schönheit ha scritto: > >>> as I was the one who wrote this service (out of a particular need): > >>> Sorry, I wasn't aware that Type is such a ... difficult thing in Basic. > >>> I'll keep that in mind for the next API I design :-\ > > This is the

Re: [api-dev] use of css.container.EnumerableMap

2011-01-05 Thread Frank Schönheit
Hi Andreas, > So also the following will be supported: > > aLongType = CreateUnoValue( "type", "long" ) > > or as in our case with fixed target type "type": > > aMap = com.sun.star.container.EnumerableMap.create( "long", "string" ) That would be really useful - great idea! Ciao Fran

Re: [api-dev] Enhancing StarBasic then ? (Re: [api-dev] use of css.container.EnumerableMap

2011-01-05 Thread Andreas Bregas
Hi, >> Il 21/12/2010 10:25, Frank Schönheit ha scritto: >>> as I was the one who wrote this service (out of a particular need): >>> Sorry, I wasn't aware that Type is such a ... difficult thing in Basic. >>> I'll keep that in mind for the next API I design :-\ This is the wrong way, I think. Ha

Re: [api-dev] use of css.container.EnumerableMap

2011-01-05 Thread Andreas Bregas
Hi Ariel, after returning from Christmas holiday I've had a look at the problem in the meantime. Thanks for your helpful test macros. > css.container.EnumerableMap is a new-style service, with constructors, and > AFAIK, new-style service constructors are now (I don't recall since when) > supp

Re: [api-dev] Enhancing StarBasic then ? (Re: [api-dev] use of css.container.EnumerableMap

2011-01-03 Thread Frank Schönheit
Hi Rony, >> The fact is that the usability and compatibility with StarBasic or >> other scripting languages is not a requirement for new API. (AFAIK) > If that is true, it is shooting in oneselves foot! > :( > > So is that really true? As said in my other reply, making something an requirement d

[api-dev] Enhancing StarBasic then ? (Re: [api-dev] use of css.container.EnumerableMap

2010-12-23 Thread Rony G. Flatscher
On 22.12.2010 17:56, Paolo Mantovani wrote: > > Il 21/12/2010 10:25, Frank Schönheit ha scritto: > [...] >> as I was the one who wrote this service (out of a particular need): >> Sorry, I wasn't aware that Type is such a ... difficult thing in Basic. >> I'll keep that in mind for the next API I de

Re: [api-dev] use of css.container.EnumerableMap

2010-12-22 Thread Frank Schönheit
Hi Paolo, > In any case, I think that this kind of situation will be repeated in the > future. > > The fact is that the usability and compatibility with StarBasic or other > scripting languages is not a requirement for new API. (AFAIK) There's a lot of things which are a requirement and nonethele

Re: [api-dev] use of css.container.EnumerableMap

2010-12-22 Thread Paolo Mantovani
Hi Frank, Il 21/12/2010 10:25, Frank Schönheit ha scritto: Hi Paolo, [...] as I was the one who wrote this service (out of a particular need): Sorry, I wasn't aware that Type is such a ... difficult thing in Basic. I'll keep that in mind for the next API I design :-\ Thank you, this is great

Re: [api-dev] use of css.container.EnumerableMap

2010-12-21 Thread Frank Schönheit
Hi Paolo, > That's great! this powerful service could greatly simplify the > development of macros / extension > but.. > ... > The new uno service needs two parameters "UNO Type" a sort of object > very complex and abstract for a novice not expert in OOP (for example > 99% of macro writers)

Re: [api-dev] use of css.container.EnumerableMap

2010-12-20 Thread Paolo Mantovani
Il 18/12/2010 15:00, Paolo Mantovani ha scritto: [...] unfortunately the implementation is so complicated and counterintuitive that nobody will use it. Of course I'm able to use it even in basic, ehmmm, clearly it was just my optimistic guess... Thanks to Ariel, Bernard and Stephan for the res

Re: [api-dev] use of css.container.EnumerableMap

2010-12-20 Thread Bernard Marcelly
Issue finally created (after servlet errors) Regards Bernard Message de Stephan Bergmann date 2010-12-20 10:12 : On 12/19/10 08:39, Bernard Marcelly wrote: I tried to make it work like this: Dim keyType As Object, valueType As Obje

Re: [api-dev] use of css.container.EnumerableMap

2010-12-20 Thread Stephan Bergmann
On 12/19/10 08:39, Bernard Marcelly wrote: I tried to make it work like this: Dim keyType As Object, valueType As Object, reflect As Object reflect = CreateUnoService("com.sun.star.reflection.CoreReflection") keyType = reflect.forName("string") valueType = reflect.forName("long") enuMap = com.s

Re: [api-dev] use of css.container.EnumerableMap

2010-12-18 Thread Bernard Marcelly
I fully agree with Paolo, this kind of API is a complex solution to a simple need. I tried to make it work like this: Dim keyType As Object, valueType As Object, reflect As Object reflect = CreateUnoService("com.sun.star.reflection.CoreReflection") keyType = reflect.forName("string") valueType

Re: [api-dev] use of css.container.EnumerableMap

2010-12-18 Thread Ariel Constenla-Haile
On Saturday 18 December 2010, 21:34:00, Ariel Constenla-Haile wrote: > IMHO the wrong choice was to use the UNO type instead of > com.sun.star.uno.TypeClass. > With TypeClass and the support for new-style service constructor, it could > have been as simple as: > > Dim aMap > aMap =

Re: [api-dev] use of css.container.EnumerableMap

2010-12-18 Thread Ariel Constenla-Haile
Hello Paolo, On Saturday 18 December 2010, 11:00, Paolo Mantovani wrote: > Hi, > > after many years, ooo api users have finally got a concrete generic > implementation of an "associative array" or "Lookup table" or > "dictionary list" > > That's great! this powerful service could greatly simplif