WTF is wrong {Xojo 2019r1.1)

This is an event handler on a “bevel button”

Sub Action(index as Integer) Handles Action
  Select Case index // UNDEFINED OPERATOR : Type Integer does not define "=" with Type PAI
  Case 0 : add_new_profile // THIS METHOD DOES NOT RETURN A VALUE
  Case 1 : del_old_profile  // THIS METHOD DOES NOT RETURN A VALUE
  End Select 
End Sub
  1. no, neither methods return a value, nor are they expected to
  2. There are no “pairs” in the app, so this makes no sense either

#2 also says the code line is

Select Case Select Case Index

which is clearly is not


Sub Action(index as Integer) Handles Action
  Select Case index // UNDEFINED OPERATOR : Type Integer does not define "=" with Type PAI
  Case 0 : add_new_profile // THIS METHOD DOES NOT RETURN A VALUE
  Case 1 : del_old_profile  // THIS METHOD DOES NOT RETURN A VALUE
  End Select 
End Sub
  1. CASE X - remove the :slight_smile:
  2. move the code to the next line

: is the PAIR operator

yeah… can’t mix Xojo and Swift it seems :slight_smile: