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 20 APR 2022 05:49:01PM Donald Bakke wrote:

OpenInsight 9.4

We just ran into what we think is a long standing bug. When using OBJ_CALL_EVENT to call our commuter module, any events that pass data that begin with a period come through as empty. This can be easily observed by adding a CHANGED event to an edit line control and using the QuickEvent to call a commuter module. Entering .9999 will come through empty but 0.9999 will come through as expected. The Script Event handler gets the correct value and directly calling the commuter module via the QuickEvent gets the correct value, so it seems clear that this is a bug in OBJ_CALL_EVENT.

I tested OpenInsight 10 using all of the available methods for calling a commuter module and it works as expected.

Is this something that can be patched?

Don Bakke

SRP Computer Solutions, Inc.


At 20 APR 2022 09:59PM bob carten wrote:

You are correct, that behavior has been there since the function was written about 20 years ago.

It's in the logic which swaps tokens like '@SELF' and '@EVENT'. The goal was to accept a literal '.ControlName' token and replace it with the deprop value for that control.


function obj_Call_Event( object, method, param1, param2, param3, param4, param5, param6, param7, param8, param9, param10 )

// ...

* Groom parameters

	if method _eqc '@EVENT' then

		method = Get_Current_Event()

	End

	equ SPECIALS$ to "@WINDOW @OBJECT @SELF @DEFPROP @EVENT"

	for i = 1 to argcount

		changed = false$

		begin case

			Case i = 1 ; point val to  Param1

			Case i = 2 ; point val To  Param2

			case i = 3 ; point val to  Param3

			case i = 4 ; point val to  Param4

			case i = 5 ; point val to  Param5

			Case i = 6 ; point val to  Param6

			case i = 7 ; point val to  Param7

			case i = 8 ; point val to  Param8

			case i = 9 ; point val To  Param9

			case i = 10 ; point val to  Param10

			Case otherwise$; point val To blank

				

		end case

		

		If Assigned(val) Else val = ''

		

		if len(val) then

			uval = val

			convert @lower.case to @upper.case in uval

			locate uval in SPECIALS$ using ' ' setting pos then

				begin case

					case pos = 1 ; val = AtWindow

					case pos = 2 ; val = Object

					case pos = 3 ; val = Object

					case pos = 4 ; val = Get_Property(Object, 'DEFPROP')

					case pos = 5 ; val = Get_Current_Event()

				end case

				changed = true$

			end else

				begin case

					case uval[1,'.'] = '@WINDOW'

						val = Get_Property( uVal, 'DEFPROP')

					case   uval[1,1] = '.'

						val = Get_Property( AtWindow: uval, 'DEFPROP')

					case uval[1, 1] = '@'

						val = Get_Property( Object, uval )

				end case

			end

		end

		

		

	Next

At 20 APR 2022 10:18PM Donald Bakke wrote:

You are correct, that behavior has been there since the function was written about 20 years ago.

It's in the logic which swaps tokens like '@SELF' and '@EVENT'. The goal was to accept a literal '.ControlName' token and replace it with the deprop value for that control.

I appreciate the explanation and it is nice to have this confirmed. Can this be patched? As I noted, OI 10 does not appear to have this problem so I am guessing it was re-written?

Don Bakke

SRP Computer Solutions, Inc.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/d2d50bbbd2693a43981207e521706999.txt
  • Last modified: 2024/01/04 20:57
  • by 127.0.0.1