B4J Code Snippet [Tool] Property generator (not only for B4J, of course)

UPDATED. Read from Erel's post (#3)



1.gif



https://www.b4x.com/android/forum/threads/automatic-property-creation.126733/post-792672
 

Attachments

Last edited:
Strangely... you're right (as always ?).

I vaguely remembered this but I always used "m" as a prefix for the "property variable", so over time I forgot it.

I will look for a solution (I also thought of having them create multiple properties in one go, if you selected multiple declaration lines, but this was not a real tool I wanted to create, I would have liked... something else ;))
 
I will look for a solution
I have two options (or more?):

1 - force the programmer to use a prefix in the variable name (but I don't like that)

2 - add a suffix to the property name; for example if the variable name is... Name, the property would be "Sub setNameProp" (I don't like this too much but it's better than the previous one)

Other ideas?
 
If I remember correctly, the property will not be recognized as a property if there is a global variable with the same name. Check it.
I will look for a solution
2 - add a suffix to the property name; for example if the variable name is... Name, the property would be "Sub setNameProp" (I don't like this too much but it's better than the previous one)
Applied this second option.
 
The problem with writing a 'quick' utility is that it generally grows to the stage that it is no longer as quick :). Feel free to take any logic you want from my effort.
 
You mean.... there Logic involved????
Only very loosely. My development logic:

B4X: Copy
Sub DevelopmentLogic
    Dim TakeAGuess As Boolean = False
    Do While TakeAGuess = False
      TakeAGuess = FiddleWithIt
    Loop

    Log("At Last ... Time for Coffee")
End Sub

Private Sub FiddleWithIt As Boolean
    Scratch Head
    TrySomethingElse
    Return TrySomethingElse = True
End Sub
 
Last edited:
Hummm like the logic explanation I just posted in the chit-chat!
 
Back
Top