Bug? Selection of class subs

Discussion in 'Bugs & wishlist' started by kohle, Apr 23, 2015.

  1. kohle

    kohle Active Member Licensed User

    b4a_23-04-_2015_14-40-44.png


    It should be get_Counter, but shows only _Counter
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    The name you are using for the property is not valid as identifier names should not start with underscore. Usually the compiler will throw an error about this, however in this case it doesn't.
     
  3. kohle

    kohle Active Member Licensed User

    The name of the sub in the class is

    get_Counter() as string
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Yes, this creates a property named _Counter which is not an allowed identifier.
     
  5. klaus

    klaus Expert Licensed User

    You should use
    getCounter() As String
    in this case Counter is considered by the compiler as a property !
    So you should return a value for Counter.
    You could also use setCounter to set the Counter property.
    If you want the routin being a subroutine you could use GetCounter or Get_Counter, in this case they will be considered as routines and not as Properties.
     
  6. kohle

    kohle Active Member Licensed User

    I understood.

    Please, put yourself in the position of a beginner.

    What happen in my case :

    1) Definitly I use jk.get_Counter and it works without an error.

    2) On the right site I see in the List (tab modules) get_Counter

    3) I only dont see it correct in the combobox.

    For a beginner this is certainly not clear
    What can be or not the developer of b4a should control. (Warning .... and so on)


    rgs
    Kohle
     
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