Using 4.70
I have a normal class with the following method :
B4X:
public Sub setHTMLFile(fn As String)
...
End Sub
That method does not show in the code completion drop down for the instantiated class, but it does work OK if I call it anyway. That said it doesn't recognise it as a setter any more, I have to call it like this :
B4X:
x.setHTMLFile("hi")
What's the criteria for Subs appearing in the completion drop down? I've seen this before but I can't remember the circumstances surrounding the others. If I set the Sub name to almost anything else it code completes as expected and I can use it as a setter (ie x.HTMLFileName="hi")
1. If that's a property, how do I then reference it inside the class itself if it's not declared as a class global? Or do I still have to set a different property with the new value?
2. Klaus - what is the difference in your declarations that makes one a property setter and one a method definition?
EDIT -
If I create a new property called for example pHtmlFile and set or return that in the getter/setter that works.
1. If that's a property, how do I then reference it inside the class itself if it's not declared as a class global? Or do I still have to set a different property with the new value?
2. Klaus - what is the difference in your declarations that makes one a property setter and one a method definition?
2 - the difference is the caps "S" vs "s"...
Lowercase set and get prefixes will be treated as properties, while any other prefix or name will be treated as method