I IdasI4A Active Member Licensed User Longtime User Jun 25, 2019 #1 I would like define properties with parameters (pairs of functions getXXX/setXXX) in a way similar to: Code: Copy public Sub setTextMatrix(Fila as int, Columna as int, Valor As String) ' .... End Sub public Sub getTextMatrix(Fila as int, Columna as int) As String '.... End Sub B4A already has this feature, but with no parameters. I'd like to be able to define it and see in the IDE in the same way: It's usage should be like the following: Code: Copy miTabla.TextMatrix(1,2)="Hello" ' or S=mitabla.TextMatrix(2,3) Thank you
I would like define properties with parameters (pairs of functions getXXX/setXXX) in a way similar to: Code: Copy public Sub setTextMatrix(Fila as int, Columna as int, Valor As String) ' .... End Sub public Sub getTextMatrix(Fila as int, Columna as int) As String '.... End Sub B4A already has this feature, but with no parameters. I'd like to be able to define it and see in the IDE in the same way: It's usage should be like the following: Code: Copy miTabla.TextMatrix(1,2)="Hello" ' or S=mitabla.TextMatrix(2,3) Thank you
alwaysbusy Expert Licensed User Longtime User Jun 25, 2019 #2 That is like the weirdest thing I have ever seen. I don't even think the underlying Java is able to do that.
That is like the weirdest thing I have ever seen. I don't even think the underlying Java is able to do that.
Erel B4X founder Staff member Licensed User Longtime User Jun 25, 2019 #3 alwaysbusy said: That is like the weirdest thing I have ever seen. I don't even think the underlying Java is able to do that. Click to expand... It doesn't really matter whether the underlying Java can do it or not. There are many features in B4X that are not supported by Java (resumable subs, properties and many others). I'm not sure how many developers will use such a feature however it is similar to C# index properties.
alwaysbusy said: That is like the weirdest thing I have ever seen. I don't even think the underlying Java is able to do that. Click to expand... It doesn't really matter whether the underlying Java can do it or not. There are many features in B4X that are not supported by Java (resumable subs, properties and many others). I'm not sure how many developers will use such a feature however it is similar to C# index properties.