1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Wish Set & Get with parameters

Discussion in 'Bugs & wishlist' started by IdasI4A, Jun 25, 2019.

  1. IdasI4A

    IdasI4A Member Licensed User

    I would like define properties with parameters (pairs of functions getXXX/setXXX) in a way similar to:
    Code:
    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:
    upload_2019-6-25_15-43-3.png
    It's usage should be like the following:
    Code:
    miTabla.TextMatrix(1,2)="Hello"
    ' or
    S=mitabla.TextMatrix(2,3)
    Thank you
     
  2. alwaysbusy

    alwaysbusy Expert Licensed User

    That is like the weirdest thing I have ever seen. I don't even think the underlying Java is able to do that.
     
  3. Erel

    Erel Administrator Staff Member Licensed User

    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.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice