This is my first time creating a dialog box, and I am struggling to create conditions based on chosen values from a COMBOBOX dropdownlist.

A simplification of what I want is in the code below.

The user selects your favorite fruit from the options apple, banana, other. Then, I want to enable/disable an EDIT field according to whether other was chosen in the drop down list, so the user may type his custom answer.

Any help would be much appreciated!


Code:
VERSION 15.0

POSITION . . 200 60

DIALOG main, label("Help") tabtitle("Main")
BEGIN

  TEXT     tx_fruit     10   10  120  .,    label("Your favorite fruit is...")
  COMBOBOX cb_fruit      @  +20  60   .,                            ///
           dropdownlist                                             ///
           contents(fruit_list)                                     ///
           onselchange(script main_cb_fruit_change)
  EDIT     ed_fruit     +60  @  100    .,                           ///
           tooltip("For example: pear")

END

LIST fruit_list
BEGIN
  apple
  banana
  other
END

SCRIPT main_cb_fruit_change
BEGIN
  ***** HELP NEEDED: HOW TO CORRECT THE LINE BELOW? ****
  if main.cb_fruit == "other" {
    main.ed_fruit.enable
  }
  else {
    main.ed_fruit.disable
  }
END

OK ok1,      label("OK")
CANCEL can1, label("Cancel")
RESET res1


PROGRAM command
BEGIN
    put `"display "Thanks for the help""'
END