Re: [udk-dev] Mapping of UNO method pairs StarBasic pseudo Properties

2008-01-23 Thread Bernard Marcelly

Hi Paolo,

Message de Paolo Mantovani  date 2008-01-22 23:55 :
That said, I've just noticed that in my ooo 2.3.1 - Italian (Linux) , the 
following starbasic code gets an error of type mismatch (not sure of the 
translation):


  Dim bModified As Boolean
  bModified = ThisComponent.Modified



This code instead runs without errors:
  bModified = ThisComponent.isModified()


I'm quite sure that in previous versions I never observed this problem. 
can anyone confirm ?




I just tested again with OOo 1.1.5. It's the same. A method
isSomething() does _not_ produce a pseudo-property Something.
Uno language binding documentation for Basic (and for COM) say nothing 
for isSomething() methods.


You may have been fooled (like me) from the fact that pseudo-property
Modified does exist in OOoBasic.
But it is a write-only property!
Because there is a method setModified(boolean) but no getModified().

Other case: there is a method isReadOnly() but there is no method
setReadOnly(boolean). As a consequence there is no pseudo-property ReadOnly.

In a Calc cell you have a pseudo-property IsMerged which is read-only,
because there is a method getIsMerged(). And there is no method
setIsMerged(boolean), but only the method merge(boolean).
A cleaner naming would have been to define isMerged() instead of
getIsMerged(). And then there would be no pseudo-property.

In a Calc cell annotation you find the pseudo-property IsVisible because
there is getIsVisible() and setIsVisible(boolean).
Here again it is an awkward naming. It should have simply been named
getVisible() and setVisible(boolean), producing a pseudo-property
Visible. But what's done is done.

__
Bernard



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Mapping of UNO method pairs StarBasic pseudo Properties

2008-01-23 Thread Fernand Vanrie

Bernard Marcelly wrote:

Hi Paolo,

Message de Paolo Mantovani  date 2008-01-22 23:55 :
That said, I've just noticed that in my ooo 2.3.1 - Italian (Linux) , 
the following starbasic code gets an error of type mismatch (not 
sure of the translation):


  Dim bModified As Boolean
  bModified = ThisComponent.Modified



This code instead runs without errors:
  bModified = ThisComponent.isModified()


I'm quite sure that in previous versions I never observed this 
problem. can anyone confirm ?




I just tested again with OOo 1.1.5. It's the same. A method
isSomething() does _not_ produce a pseudo-property Something.
Uno language binding documentation for Basic (and for COM) say nothing 
for isSomething() methods.


You may have been fooled (like me) from the fact that pseudo-property
Modified does exist in OOoBasic.
But it is a write-only property!
Because there is a method setModified(boolean) but no getModified().

Other case: there is a method isReadOnly() but there is no method
setReadOnly(boolean). As a consequence there is no pseudo-property 
ReadOnly.


In a Calc cell you have a pseudo-property IsMerged which is read-only,
because there is a method getIsMerged(). And there is no method
setIsMerged(boolean),

As i am not a professional coder i see an bit of logic begint this :-)
merging can only be done by other methods ?

but only the method merge(boolean).
A cleaner naming would have been to define isMerged() instead of
getIsMerged(). And then there would be no pseudo-property.

In a Calc cell annotation you find the pseudo-property IsVisible because
there is getIsVisible() and setIsVisible(boolean).

setVisible is a action who can bedone with this method ?

Here again it is an awkward naming. It should have simply been named
getVisible() and setVisible(boolean), producing a pseudo-property
Visible. But what's done is done.

__
Bernard



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [udk-dev] Mapping of UNO method pairs StarBasic pseudo Properties

2008-01-23 Thread Paolo Mantovani
Hi Bernard,

Bernard Marcelly ha scritto:
[...]
 I just tested again with OOo 1.1.5. It's the same. A method
 isSomething() does _not_ produce a pseudo-property Something.
 Uno language binding documentation for Basic (and for COM) say nothing
 for isSomething() methods.
 
 You may have been fooled (like me) from the fact that pseudo-property
 Modified does exist in OOoBasic.
 But it is a write-only property!
 Because there is a method setModified(boolean) but no getModified().

opz :-)
Thank you for checking, of course you are right.
My memory was completely wrong, sorry


 
 In a Calc cell you have a pseudo-property IsMerged which is read-only,
 because there is a method getIsMerged(). And there is no method
 setIsMerged(boolean), but only the method merge(boolean).
 A cleaner naming would have been to define isMerged() instead of
 getIsMerged(). And then there would be no pseudo-property.
 
 In a Calc cell annotation you find the pseudo-property IsVisible because
 there is getIsVisible() and setIsVisible(boolean).
 Here again it is an awkward naming. It should have simply been named
 getVisible() and setVisible(boolean), producing a pseudo-property
 Visible. But what's done is done.


yes, now I see that there may be some case where method names are not
perfectly consistent and I was fooled from them.
Of course I can live with it, I have just to remember it for the next
time...

Thank you again for the detailed explanation and for taking the time .


ciao
Paolo M

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]