Highlighted
Absent Member.
Absent Member.
623 views

[archive] Grid & Events

[Migrated content. Thread originally posted on 22 November 2005]

Folks,

Anyone use grids with events which trigger another screen for example?

If so, do you make the actual accept of the screen terminate and catch this outside of the accept before starting the new screen?

Or again for example your in screenx and you allow a button push which displays another screen, again do you make the first accept terminate before displaying/accepting the new screen?

Shaun
0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Grid & Events

We have tried to get into the practice of getting out of those event procedures (and therefore the accept) to handle any complex logic. We've encountered various issues (some may only apply to us) that cause us to think this way. One reason is to avoid recursive accepts. Another reason is that an event may fire from the original accept at a time that you are not expecting an event. Being outside of the accept should prevent that...

Anyway, we try to avoid those situations, but there are many places where we do stay in the event procedure and have been okay, too.

Rob
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Grid & Events

Rob,

Do you use grids too?

What way do you handle the event procedure on the grid regarding terminating the accept, and more importantly catching the termination.

Mainly the GOTO-CELL-MOUSE event triggering another screne to be displayed.

We're not using event-cmd-clicked that much in any of our programs, only certain screens use this and its mainly for lookups on fields.
We've switched over to exception-cmd-click on pretty much every other push button.

Thanks,

Shaun
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Grid & Events

I don't use the AcuCorp grid as much anymore because I've started using an ActiveX grid. However, I use this approach in that grid control. Essentially, I just save pertinent information about the event and then terminate the accept (SET EVENT-ACTION TO EVENT-ACTION-TERMINATE). Then outside of the accept, I handle the event based on the information I saved in the event procedure. Then, I loop back to the accept when done.

Rob
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Grid & Events

Shaun,

Yes, we do the same as Rob.

Initially we tried using just event procedure code, but we found it was much easier to handle (no events within events) by just using the EVENT-ACTION-TERMINATE setting.

So in the event procedures we only deal with very simple actions (like changing the colour of grid cells), but for more major actions (like openeing a new window) we terminate the ACCEPT and deal with it specifically.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.