Wish [B4X] BBCode (AND EVERYWHERE) comment lines on methods & properties routines

LucaMs

Expert
Licensed User
Longtime User
Message to all who publish libraries on this site!


Not only in BCTextEngine, BBCodeview, everywhere, please 🙏


1613064593659.png

1613064606116.png


RTL? https://www.rtl.it/
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
There is currently no method where one can add comments to properties in a library (as far as I'm aware), only to methods. And I really do not want to make Getters and Setters for all my properties. So until Erel has a solution, this will probably be the case for a lot of libs.
B4X properties are Getters & Setters; what other properties were you thinking about?
If you don't feel like creating get & set, let alone comment lines 😄
 

LucaMs

Expert
Licensed User
Longtime User
I consider a pure 'Public myProp as String' in _Globals also as a property. And I know you have a different opinion on Get and Set, but I follow Erel here that if they only get/set a private variable, I also don't see the point in doing that.
1 - logically properties are properties, variables are variables;
2 - very often you have to check the value assigned to a property, prevent incorrect values;
3 - not rarely you will have a read-only property, you cannot do it with a public variable.

Last but not least... you cannot add comment lines (nor example code) to public variables :mad: 😁
 

AnandGupta

Expert
Licensed User
Longtime User
I agree of facility of adding comments to properties in a library.
It will help in app development.

Regards,

Anand
 

Cableguy

Expert
Licensed User
Longtime User
In the impossibility of adding comments to properties... at least try to use meaningful names...
As Luca mentioned... RTL stands for what? Are we suppose to know what it stands for?
Read The Last? Road To London?
 

Sandman

Expert
Licensed User
Longtime User
I'm not sure if it's a joke or not, not knowing what RTL means. In case it's not a joke, I can say that given this is in the context of text on a computer, it means Right To Left. I would have thought that is fairly well known, but I might be wrong.

 

LucaMs

Expert
Licensed User
Longtime User
It is currently not possible to add such descriptions to global variables.
For me using public variables instead of properties is almost... unnatural 😄 , so I wouldn't want that possibility at all.

Mine was a message, an invitation to those who publish libraries to comment on properties and methods of their classes, otherwise it is necessary to go and look for documentation.
It is even possible to add copyable code with one click, which is really useful
 

Alessandro71

Well-Known Member
Licensed User
Longtime User
+1 to Luca's wish
Even if I don't publish any library, I'm writing simple setters and getters to properties on my code just to add descriptions to it, for my own usage, because I know that, just a few days after writing them, I'll have doubts about their meaning
 
Top