Skip to content

Commit 732c7df

Browse files
committed
documentation work
1 parent f8deae8 commit 732c7df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -644,11 +644,11 @@ Whether you want to use the **pysimplesql**.actions() convenience function, writ
644644

645645
## SIMPLE BUT ROBUST PROMPT SAVE SYSTEM
646646
Nothing is worse than a program that doesn't catch when you forget to save changes - especially if those programs deal with data entry. **pysimplesql** has a simple but robust prompt save system in place. This is enabled by default, but can be turned off if needed. Prompt saves can be thought of as having 3 levels - a Form level which affects all queries of the Form, a Query level which affects only specific queries, and a manual level where you can command the system to prompt to save changes (such as when switching tabs in a tab group, at specified intervals, or when shutting down your program). The system is smart enough to only prompt if an actual change is found.
647-
###Form-level prompt save###
647+
### Form-level prompt save
648648
Simply call ```python frm.set_promt_save(True) # or False to disable``` to enable automatic promt saves any time the user navigates away from a record that has changed. This happens for any and all Queries attached to this Form.
649-
###Query-level prompt save###
649+
### Query-level prompt save
650650
A call to ```python frm['table_name'].set_prompt_save(True) # or False to disable for this Query``` can enable/disable automatic prompting for individual Queries
651-
###Manual prompting###
651+
### Manual prompting
652652
To manually prompt for a save, just do a direct call to ```python frm.prompt_save(). There is an optional autosave=True/False parameter to enable an autosave feature which will make these saves happen automatically without bothering the user for their input. Its also a great thing to put in your main loop exit conditions to ensure changes are saved before shutting down. There are a couple of caveats to using the prompt_save() call on the main loop exit condition - please see example below:
653653
```python
654654
# For using the prompt save system on exit, you have to add the enable_close_attempted_event=True parameter during PySimpleGUI window creation

0 commit comments

Comments
 (0)