Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== SAVEWARN property ====== ==== Applies To ==== Window. ==== Description ==== Set to true by the system when changes are made to data in bound controls. Reset by the system to false after the [[read_event|READ]], [[write_event|WRITE]], and [[clear_event|CLEAR]] events. ==== Usage ==== //status// = **Get_Property**(//windowname//, "**SAVEWARN**") //oldstatus// = **Set_Property**(//windowname//, "**SAVEWARN**", //truefalse//) ==== Remarks ==== SAVEWARN specifies whether or not the user should be warned that changes have been made, for example, when the user tries to close the form. To suppress these messages, reset SAVEWARN to false (0). Since the system, on CLOSE, SAVE, and CLEAR, checks if the [[defprop|DEFPROP property]] of the current control has been changed from the GOTFOCUS_VALUE, you may want to send the [[gotfocus_event|GOTFOCUS event]] to the control before resetting SAVEWARN and sending the CLOSE event, so that the GOTFOCUS_VALUE matches DEFPROP. This allows the window to close unconditionally. See the Example section for code implementing this method. ==== See Also ==== [[modified|MODIFIED property]] ==== Example ==== <code> * The following code snippet handles the turning off of the SAVEWARN message during the * CLOSE event of the window. This code should be placed into the CLOSE Event Handler. declare function Set_Property, Get_Property, Send_Event * determine which control has focus GotFocus_Control = Get_Property(@window,"GOTFOCUS_CONTROL") * force the matching of the GOTFOCUS and DEFPROP properties on the control which has focus x = Send_Event(GotFocus_Control,"GOTFOCUS") * Turn the SAVEWARN message off x = Set_Property(@window,"SAVEWARN",0) </code> guides/programming/programmers_reference_manual/savewarn.txt Last modified: 2024/06/19 20:20by 127.0.0.1