Skip to main content

[archive] Radio sets and EVENT-ACTION-TERMINATE

  • August 24, 2007
  • 5 replies
  • 0 views

[Migrated content. Thread originally posted on 21 August 2007]

I'm attempting to cancel the event action of clicking on a radio button and revert to the previous radio button using acubench. here is a sample of code that illustrates what I am attempting to do but it still just flows through and continues with the selection of the next radio button... The check for changes displays a save message box with Yes (save changes) No (abort changes) Cancel (stop the change of the radioset and leave as is).

This should be really simple to do, but it's not... any ideas?

       
MainWin-Rb-5-Ev-Cmd-Goto.
      PERFORM C100-CHECK-FOR-CHANGES THRU C100-EXIT.
      IF STATUS-CODE = 3
          SET EVENT-ACTION TO EVENT-ACTION-TERMINATE
      END-IF.

5 replies

[Migrated content. Thread originally posted on 21 August 2007]

I'm attempting to cancel the event action of clicking on a radio button and revert to the previous radio button using acubench. here is a sample of code that illustrates what I am attempting to do but it still just flows through and continues with the selection of the next radio button... The check for changes displays a save message box with Yes (save changes) No (abort changes) Cancel (stop the change of the radioset and leave as is).

This should be really simple to do, but it's not... any ideas?

       
MainWin-Rb-5-Ev-Cmd-Goto.
      PERFORM C100-CHECK-FOR-CHANGES THRU C100-EXIT.
      IF STATUS-CODE = 3
          SET EVENT-ACTION TO EVENT-ACTION-TERMINATE
      END-IF.
The only way I could get the first radio button to be "on" again - after the event cancel was to destroy and re display the screen:mad:

[Migrated content. Thread originally posted on 21 August 2007]

I'm attempting to cancel the event action of clicking on a radio button and revert to the previous radio button using acubench. here is a sample of code that illustrates what I am attempting to do but it still just flows through and continues with the selection of the next radio button... The check for changes displays a save message box with Yes (save changes) No (abort changes) Cancel (stop the change of the radioset and leave as is).

This should be really simple to do, but it's not... any ideas?

       
MainWin-Rb-5-Ev-Cmd-Goto.
      PERFORM C100-CHECK-FOR-CHANGES THRU C100-EXIT.
      IF STATUS-CODE = 3
          SET EVENT-ACTION TO EVENT-ACTION-TERMINATE
      END-IF.
I just had a similar issue, and here is what I found that works:


MOVE # TO CONTROL-ID
MOVE 4 TO ACCEPT-CONTROL


Where # is the control ID for the radio button that you want to be selected. You may have to then display your screeen to see the change.

Hope that helps,

Paul

[Migrated content. Thread originally posted on 21 August 2007]

I'm attempting to cancel the event action of clicking on a radio button and revert to the previous radio button using acubench. here is a sample of code that illustrates what I am attempting to do but it still just flows through and continues with the selection of the next radio button... The check for changes displays a save message box with Yes (save changes) No (abort changes) Cancel (stop the change of the radioset and leave as is).

This should be really simple to do, but it's not... any ideas?

       
MainWin-Rb-5-Ev-Cmd-Goto.
      PERFORM C100-CHECK-FOR-CHANGES THRU C100-EXIT.
      IF STATUS-CODE = 3
          SET EVENT-ACTION TO EVENT-ACTION-TERMINATE
      END-IF.
The only way I could get the first radio button to be "on" again - after the event cancel was to destroy and re display the screen:mad:


Thanks for giving it a try for me. As it appears I have noticed that you can only set a radioset's default value BEFORE you display the screen. I'm guessing this is the reason for it... To bad there isn't a more graceful way to implement this, maybe it's just not proper technique to do it this way. I wonder if there a better way to handling a situation like I want to implement maybe?

[Migrated content. Thread originally posted on 21 August 2007]

I'm attempting to cancel the event action of clicking on a radio button and revert to the previous radio button using acubench. here is a sample of code that illustrates what I am attempting to do but it still just flows through and continues with the selection of the next radio button... The check for changes displays a save message box with Yes (save changes) No (abort changes) Cancel (stop the change of the radioset and leave as is).

This should be really simple to do, but it's not... any ideas?

       
MainWin-Rb-5-Ev-Cmd-Goto.
      PERFORM C100-CHECK-FOR-CHANGES THRU C100-EXIT.
      IF STATUS-CODE = 3
          SET EVENT-ACTION TO EVENT-ACTION-TERMINATE
      END-IF.
The only way I could get the first radio button to be "on" again - after the event cancel was to destroy and re display the screen:mad:


Thanks for giving it a try for me. As it appears I have noticed that you can only set a radioset's default value BEFORE you display the screen. I'm guessing this is the reason for it... To bad there isn't a more graceful way to implement this, maybe it's just not proper technique to do it this way. I wonder if there a better way to handling a situation like I want to implement maybe?

[Migrated content. Thread originally posted on 21 August 2007]

I'm attempting to cancel the event action of clicking on a radio button and revert to the previous radio button using acubench. here is a sample of code that illustrates what I am attempting to do but it still just flows through and continues with the selection of the next radio button... The check for changes displays a save message box with Yes (save changes) No (abort changes) Cancel (stop the change of the radioset and leave as is).

This should be really simple to do, but it's not... any ideas?

       
MainWin-Rb-5-Ev-Cmd-Goto.
      PERFORM C100-CHECK-FOR-CHANGES THRU C100-EXIT.
      IF STATUS-CODE = 3
          SET EVENT-ACTION TO EVENT-ACTION-TERMINATE
      END-IF.
The only way I could get the first radio button to be "on" again - after the event cancel was to destroy and re display the screen:mad:


Thanks for giving it a try for me. As it appears I have noticed that you can only set a radioset's default value BEFORE you display the screen. I'm guessing this is the reason for it... To bad there isn't a more graceful way to implement this, maybe it's just not proper technique to do it this way. I wonder if there a better way to handling a situation like I want to implement maybe?