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 29 MAR 1998 07:49:28AM David Howell wrote:

To Whom It May Concern,

This is probably a Programming 101 question, but sometimes I get lost in the maze of documentation!

How can an SSP determine its calling control programatically. I know I can pass it in a parameter list, but it would be more efficient for me just to determine it in the routine, or to create a function that can return the calling control.

Thanks in advance for your response,

David Howell


At 29 MAR 1998 11:56AM David Pociu wrote:

David,

You could use Ctrl=get_property( "SYSTEM" , "FOCUS"). It works most of the time, but there are caveats involved:

For example, if your SSP does LOSTFOCUS processing, the control name is going to be the name of the NEXT control (because the current control already lost the focus). Sure, you can get the PREVIOUS property, or something like that, but that's starting to get complicated.

I suggest you re-think passing in CtrlEntId to the SSP. That always works and passing a parameter into the SSP is not such a great burden.

Personally, I standardized all my subroutines that deal with form control to the following :

compile subroutine XXXX( CtrlEntId , switch , data1 , data2, data3 , data4)

I pass switch in to tell me the event type (Gotfocus, LostFocus, Do-this, Do-that, etc)

data1,2,3,4 are parameters that might be associated with the different events (4 params max for now).

Hope this helps


At 30 MAR 1998 10:56AM Andrew McAuley wrote:

Our only modifier is that we put switch then ctrlentid so we don't need to pass a null when ctrlentid isn't used.

amcauley@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft


At 30 MAR 1998 07:25PM David Howell wrote:

David & Andrew,

Thanks for your timely responses! I must tell you why I keep asking some (what may seem) fairly basic questions. I tell you this because I don't think I'm the only one who "fits this bill". I have been programming with AREV since 1989. Over these years, I have built quite a collection of utilities that are called upon by practically every process (i.e. window, program code) that I develop. These utilites make data entry & lookup very easy. In fact these utilites play a significant part in distinguishing using AREV from any other DBMS! Many of these utilities are user defined conversions that accept a static set of parameters. They are in fact identical to the ones in the PHONE_FORMAT conversion provided by RTI with OI. I am hoping to avoid as much modification to the parameter list for these conversions as possible. Thus, all these basic questions.

I want to thank you for your reponses to my previous questions. I believe I have found the solutions to some of them, but I am waiting to see how the do "in the field" before posting to the group out of fear of misleading people.

Again thank you for your time & expertise


At 31 MAR 1998 08:26PM Barry Stevens wrote:

If only the input validation needs to know the CtrlEntId for prompt calling the UDC, then all you need in the UDC routine is:

CtrlEntId=get_property(@Window,"FOCUS")

if error then setting status()=0 will keep focus, same as Arev.

Barry

View this thread on the Works forum...

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