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 10 AUG 1998 09:56:59PM Michael Moran wrote:

It appears as though the SAVEWARN property doesnt get set until the control that was changed loses focus. This means that if a user hits the save key before leaving the control that has been changed, then you cant test the SAVEWARN property in the WRITE event.

I want to be able to write a "last changed date" and "last changed time" to an audit file if the record has changed. If the user hits save, but the the record hasnt changed, I dont want to save the audit. Thus the reason for using SAVEWARN.

Thanks,

Michael


At 10 AUG 1998 10:35PM Don Bakke wrote:

Michael,

Yes, SAVEWARN is triggered by the LOSTFOCUS event. This is when OI determines if there is a change in the current field. System level events, like CLEAR, will automatically send a LOSTFOCUS event to the current control to make sure that any changes are registered and the SAVEWARN property is set appropriately.

In your case you are executing a WRITE event script which occurs before the system level WRITE event so no LOSTFOCUS has taken place. The solution: place a couple lines of code like…

Focus=Get_Property(@Window, "FOCUS")

call Send_Event(Focus, "LOSTFOCUS")

Before you check the SAVEWARN property. Everything should work as intended.

[email protected]

SRP Computer Solutions


At 12 AUG 1998 12:13AM Aaron Kaplan wrote:

In the menu designer, there's an option to generate the lostfocus event before the menu item is called. Set this on the save menu and you should have your lostfocus, and savewarn.

[email protected]

Sprezzatura, Inc.

www.sprezzatura.com_zz.jpg


At 12 AUG 1998 02:12AM Don Bakke wrote:

In the menu designer, there's an option to generate the lostfocus event before the menu item is called.

I haven't checked this out myself, but I thought this didn't apply when using hotkeys (i.e. Ctrl-S, F9) to execute menu functions.

[email protected]

SRP Computer Solutions


At 13 AUG 1998 12:33AM Aaron Kaplan wrote:

Just ran a few really quick tests and it appears to generate using the hotkeys. I just place quickevent message calls for these sort of tests though.

[email protected]

Sprezzatura, Inc.

www.sprezzatura.com_zz.jpg

View this thread on the forum...

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