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 SEP 1998 12:01:47PM Greg James, ISIS, Inc. wrote:

I am trying to pass a value in the createparam of the start_window function.

start_window('WINDOW_NAME','PARENT_NAME',CreateParam)

The CREATE event of the window being started uses a QuickEvent with the following parameters to execute a stored procedure:

'@SELF','CREATE'

How can I pass the contents of CreateParam to the stored procedure? I have tried '@SELF','CREATE',CreateParam, but this doesn't work.

If you know what I am doing wrong, please let me know. Thanks.


At 11 SEP 1998 01:17PM DSig (SigSolutions) wrote:

Greg,

When using CreateParams we use the CREATE event and simply write a script to call necessary procedures.

dsig

David Tod Sigafoos ~ SigSolutions

dsig@teleport.com


At 11 SEP 1998 01:36PM Don Bakke wrote:

Greg,

It sounds like you are using the QuickEvent to call an SSP or the OMNIEVENT to handle your CREATE event processing. If so, then swap the 'CREATE' with '@PARAM1' in your parameter list.

For future and additional uses of QuickEvents for this method of processing, always use '@PARAM1', '@PARAM2', '@PARAM3', etc., for the specific parameters that each event passes on.

Don Bakke

SRP Computer Solutions


At 11 SEP 1998 02:07PM Greg James, ISIS, Inc. wrote:

Don,

I'm using a stored procedure in this example to handle the 'CREATE' event of the window and the 'LOSTFOCUS' event of an editline on the window. I pass '@SELF' in order to get the the calling control's ID, and either 'CREATE' or 'LOST_FOCUS' to indicate which portion of the stored procedure to use.

Is it possible to pass multiple parameters to a procedure that come from different parts of an application? (CreateParam comes from the script for the control that starts the window, and the other parameters are assigned by different events, e.g., LOST_FOCUS, CREATE, etc.)

I like the idea of having one procedure to store what would otherwise be multiple scripts. I use the same stored procedure with 4 different MDI frames. Instead of having to change many scripts, only one change is required. I picked this up from Revelation's whitepaper on Hierarchical ListBoxes.


At 11 SEP 1998 03:15PM Dave Pociu wrote:

Greg,

I'd suggest something like

compile my_procedure( Switch , CtrlEntId, param1, param2, param3, param4)

When you call the subroutine, pass only as many parameters as needed. 4 should be the max ( used in the CLEAR event )

begin case

 case switch _EQC "Editline_LostFocus"
     gosub editline_lostfocus
 case switch _EQC "Create"
     gosub Create
 case 1
  • * some error msg

end case

return / main procedure return /

EditLine_LostFocus:

  • * param1 and param2 are loaded at this point
  • * Some code here

return

Create:

  • * param1 contains CreateParam value
  • * pre-create code
forward_event( param1 )
error=get_EventStatus()
if not( error ) then
  • * post create code
end

return

In the window, either use quickevents to call the subroutine and pass the parameters or use a script ( here's an example for the Create event)

call my_procedure( "Create" , CtrlEntId, CreateParam )

return 0


At 11 SEP 1998 03:51PM Greg James, ISIS, Inc. wrote:

Thanks for the help….works like a charm!


At 11 SEP 1998 05:25PM Don Bakke wrote:

Greg,

I'm glad it's working, but out of curiosity are you calling the SSP via the QuickEvent or did you put the call in the CREATE event script itself? If the latter, I suggest you put the call in the QuickEvent. Otherwise you are creating another entity in the SYSREPOS, SYSREPOSEVENTS, and SYSREPOSEVENTEXES tables. QuickEvent information is stored within the window definition and therefore minimizes the total number of entities in your application, which makes it easier to manage.

Don Bakke

SRP Computer Solutions


At 11 SEP 1998 07:15PM Greg James, ISIS, Inc. wrote:

Don,

I am using a QuickEvent to do this. It seems that the quick event is a 'cleaner' way of doing this. At the least, it is easier to keep track of the scripts this way.

Thanks again.

View this thread on the forum...

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