Push.Session is a subroutine that saves the current environment parameters in the variables specified.
Push.Session(cursor.loc, sentence, record, id, dict, mv)
Use Push.Session to save the values of certain environment variables:
as well as the current cursor position and video attributes.
The Push.Session subroutine has the following parameters:
|cursor.loc||Use cursor.loc to store the current cursor position.|
|sentence||Use sentence to store the current value of @SENTENCE (the most recent TCL sentence).|
|record||Use record to store the current value of @RECORD (the current record).|
|id||Use id to store the current value of @ID (the current record key).|
|dict||Use dict to store the current value of @DICT (the dictionary associated with the primary file).|
|mv||Use mv to store the current value of @MV, @INSERT (see Appendix I, "System Variables"), and the current video attributes (delimited by @RM).|
Push.Session passes the current session values described above in the argument list..
/* The following code demonstrates the use of Push.Session */ Declare subroutine Push.Session, Pop.Session, Msg Push.Session(cursor, sentence, record, id, dict, mv) * Call a subroutine that modified the environment parameters. Gosub Change_Environ Pop.Session(cursor, sentence, record, id, dict, mv)
PSA for this routine and the companion Pop.Session Subroutine. While these do work in OpenInsight, they are still technically considered AREV commands and as such might create unexpected problems. For instance, we discovered that when executed during a web API procedure, this would result in the OECGI call failing and returning a 502 Bad Gateway error. With Bryan Shumsky's help, we figured out that these routines are designed to update the AREV UI. In AREV32 this is handled through SEND_DYN which then communicates to the engine. This results in the API response being corrupted because it is being pushed through the same stream.