Wish Additional IDE warnings

Mashiane

Expert
Licensed User
Longtime User
Hi Fam

1. IDE to raise a warning where one has defined a variable in class globals, but also have a setter / getter.

Example

In class globals

B4X:
Public ActionButtons As Map

In code

B4X:
Sub setActionButtons(s As String)
    s = SDUIShared.CStr(s)
    s = s.Trim
    If s = "" Then Return
    s = s.replace("|", ";")
    Dim litems As List = SDUIShared.StrParse(";", s)
    litems = SDUIShared.ListTrimItems(litems)
    
    For Each item As String In litems
        Dim sid As String = SDUIShared.MvField(item, 1, ":")
        Dim scaption As String = SDUIShared.MvField(item, 2, ":")
        Dim scolor As String = SDUIShared.MvField(item, 3, ":")
        If sid <> "" And scaption <> "" And scolor <> "" Then AddActionButton(sid, scaption, scolor)
    Next
End Sub
 

Sandman

Expert
Licensed User
Longtime User
(Some members of the forum might not understand why this is a good idea, you might want to expand on that a little so they get it.)
 
Top