Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 02 AUG 1999 12:36:55PM Scotty Hunt wrote:

currently i handle the lstfocus event thru a script. the very first like of the script is automatic. it reads…

FUNCTION LOSTFOCUS(CTRLENTID,CTRLCLASSID,FLAG,FOCUSID)

i was wanting to do quick events since all i do is call a STPROC that handles the lostfocus for me.

the problem i have is this… the argument passed thru the script called "FLAG" i need. how can i pass this argument using quick events and not using stripting?

what i want to do ultimately is to have a window OMNIEVENT to handle all event processing for that window. i can not do that for lostfocus if i cant get that "FLAG" argument. see scripting is ok, and quick eventing is much more standardized looking.

just to let you know why i need that "FLAG" argument… if the FLAG is set to 0… that means that i lost focus to another window. if the FLAG is set to 1… that means that i lost focus to another focus within the window. and if the FLAG is set to 2… well supposely i have lost focus to a menu event.

i got to know how i lost focus.

so all i need to know is how to call the OMNIEVENT for a lostfocus by sending the FLAG argument. oh and by using the quick events.


At 02 AUG 1999 05:28PM Rob Misek wrote:

Scotty–

I will try and get this working here.  In the meantime, have you tried passing your arguement in the [b]Parameters[/b] field from within the quick event window?

Rob

Revelation


At 02 AUG 1999 06:35PM Scotty Hunt wrote:

hi rob.

see its not my argument. its the "FLAG" argument that the lostfocus script passes to me. if there is i way i can pass that argument could you tell me how?

see in the lostfocus script the first line is set automatically. it reads as the following…

FUNCTION LOSTFOCUS(CTRLENTID,CTRLCLASSID,FLAG,FOCUSID)

                                         ^
                                         |

that "FLAG" argument is what i need to send to my "OMNIEVENT". its value is critical to my ability to handle the lostfocus correctly.


At 02 AUG 1999 09:29PM Donald Bakke wrote:

Scotty,

The way you pass those additional event parameters (i.e. those that go beyond CtrlEntId and CtrlClassId) is to include an '@PARAMx' in your Parameters field, where x is a number for every additional parameter. For instance, if you want to pass your LOSTFOCUS event into the OMNIEVENT, the Parameters field should have something like this:

'LOSTFOCUS.CTRLNAME','@PARAM1','@PARAM2'

Then in your OMNIEVENT, the parameter Message will be equal to the literal 'LOSTFOCUS.CTRLNAME', Param1 will equal the contexts of the Flag parameter, and Param2 will equal the contexts of the FocusID parameter.

The problem with OMNIEVENT (although we've been using this approach for years) is that you can only pass a maximum number of 4 event parameters since the OMNIEVENT only goes up to Param4. There aren't a lot of events with more than 4 additional paramters, but there are some (like CHAR and BUTTONUP/DOWN.) You can eliminate this problem and probably make your development more productive by simply creating an SSP to process your logic rather than drive it through OMNIEVENT. This gives you the further advantage of modifying your event code while still running your window. Otherwise you have to close the window, edit the OMNIEVENT scrip, and then re-compile.

FWIW,

dbakke@srpcs.com

SRP Computer Solutions


At 02 AUG 1999 11:45PM Scotty Hunt wrote:

whoa! thanks mr. bakke! it works perfectly!

this will eliminate so much repetative scripting. YES!


At 03 AUG 1999 02:39AM Donald Bakke wrote:

Please, just call me Don. Formality makes me blush…(makes me feel older too)

dbakke@srpcs.com

SRP Computer Solutions


At 14 AUG 1999 02:20PM akaplan@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote:

Scotty,

In addition to the @PARAMx things, QuickEvents will take @WINDOW for the current window, @MDIFRAME for the current MDIFrame, @SELF for the current control, @FOCUS for the control that has focus (good for menu items) and probably one or two others I can't think of now.

akaplan@sprezzatura.com

Sprezzatura Group

www.sprezzatura.com_zz.jpg

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/1cb29c1946392f2d852567c1005b4552.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1