i make a new custom view and i have a "CustomView Property" witch i want to change in the code, the type of this Property is String in a list.
The User has 3 Options to choose in the designer, now i want to cause a error in the IDE if the user type a wrong input in this variable, is this possible?
Yes, it is possible.
You need to define a Property in the code, like:
B4X:
Public Sub setMyProperty(MyProperty As String)
If MyProperty = Option1 Or MyProperty = Option2 Or MyProperty = Option3 Then
mMyProperty = MyProperty 'class internal variable
'other code
Else
MsgBox(....
End If
End Sub
Public Sub getMyProperty As String
Return MyProperty
End Sub