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 MAY 2007 02:15:48AM Matthew Jones wrote:

I have window promoted events close_pre_system (app*CLOSE.WINDOW.OIWIN*) and close_post_system (app*CLOSE..OIWIN*).

I have a form that does "some processing".

If I launch the form, then click my close button, the window closes after calling both pre and post promoted events.

If I launch the form, and do the processing, then after the processing has finished, click my close button, the pre-system code is called, but the post-system code is not, and the form stays open.

The close button click event just does:

declare function Send_Event

bClose=1

x=Send_Event( @window, 'CLOSE', bClose )

RETURN 1

Using the debugger, upon return from the Send_Event:

x=EV107'

x='

bClose=0

I cannot find reference to "EV107" anywhere.

Can anyone suggest what I might be doing in my "process" that would prevent the post-system event from firing?

Thanks,

Matthew Jones.


At 02 MAY 2007 03:42AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:

Matthew,

From the EV107 I suspect this to be related to a long-standing issue in the system CLOSE event processing which appears to be caused by the form's SAVEWARN property being set, which in turn triggers the system SYSMSG handler which would, with a databound form, display the SAVEWARN message box. However in the case of a non-db form there's a bug which passes back an incorrect value - this is fixed for OI8.0.

As a workaround before then you need ensure that SAVEWARN is not set and you should be OK.

FYI - "EV107" means "User Cancel". The EV codes can be found in the EVERRORS insert record.

The Sprezzatura Group

World leaders in all things RevSoft


At 02 MAY 2007 04:52AM Matthew Jones wrote:

You are right!

How bizarre!

But strangely, the code in the CLICK event reveals that the SAVEWARN property contains the window's title TEXT!

There's no reference to SAVEWARN in my "process" code that I can see, and there's no reference to the window's TEXT property either.

declare function Send_Event

DEBUG

x=Get_Property( @window, 'SAVEWARN' )

x=Set_Property( @window, 'SAVEWARN', 0 )

bClose=1

x=Send_Event( @window, 'CLOSE', bClose )

RETURN 0

That code seems to work, so thankyou very much.

Come on v8.0!

Regards,

Matthew Jones.

View this thread on the Works forum...

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