Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 11 AUG 1998 10:56:48AM Steve C. wrote:

Using OI3.6.1

I currently have a form with numerous GOTFOCUS and LOSTFOCUS

event scripts. I want to create a SP with a CASE statement to

handle all of the GOTFOCUS events. Rather then call the SP

from each object's GOTFOCUS, I believe I understand that I can

leave all of the objects GOTFOCUS events "blank" and create a

"Promoted event" that will be processed at each object, having

only one call to my SP. This promoted event would have the name

"APPNAME*GOTFOCUS*FORMNAME", that's all, and would execute on

each object. AM I ON THE RIGHT TRACK ??? or is there something I'm

missing.. Any help will be greatly appreciated.

P.S. I got this from reading SENL 1-7, so I hope I read it correctly.

TIA

Steve C.


At 11 AUG 1998 02:01PM Dave Pociu wrote:

Steve,

I have implemented the kind of GotFocus event you are looking for about 2 years ago and it's been working great since. Mine changes the color of certain fields throughout the application (for a standard look) and stores a @ORIGINAL_VALUE for each field.

Here's how it works:

1. In SYSREPOSEVENTEXES I have an event called APPLICATION*GOTFOCUS* , where APPLICATION is the name of the application.

2. Since you cannot write code directly for this event, you have to compile a procedure with the exact name and parameters of a GOTFOCUS event.

3. Once you have the code, just copy the executable in SYSREPOSEVENTEXES under APPLICATION*GOTFOCUS* . It should start running right away.

One thing you might want to do is to always call a regular stored procedure from the global GOTFOCUS code. Like that, you can debug it and modify it easily by just changing a regular stored procedure. It's a little slower because of the procedure call, but it's worth it in the beginning.

Hope this is what you're looking for

Dave


At 12 AUG 1998 08:32AM Steve C. wrote:

Dave,

It appears to me that having "APPLICATION*GOTFOCUS*", this gotfocus

event runs for all objects and all forms in the application "APPLICATION". Is this correct???

I am right to believe that a promoted event named

"APPLICATION*GOTFOCUS*FORMNAME" will run for all objects in just

this one FORMNAME.

Thanks ….

Steve C.


At 12 AUG 1998 09:10AM Dave Pociu wrote:

Yes Steve, you are correct!

And obviously the code gets put in there the same way.

Dave

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/bf78fab4a60d14548525665d00521b02.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1