▼ |  | Framework: Racket GUI Application Framework

1 | Application
2 | Autosave
3 | Canvas
4 | Color Model
5 | Color Prefs
6 | Color
7 | Comment Box
8 | Editor Snip
9 | Editor
10 | Exit
11 | Finder
12 | Frame
13 | Group
14 | GUI Utilities
15 | Handler
16 | Icon
17 | Keymap
18 | Menu
19 | Mode
20 | Number Snip
21 | Panel
22 | Pasteboard
23 | Path Utils
24 | Preferences
25 | Preferences, Textual
26 | Racket
27 | Text
28 | Splash
29 | Test
30 | Version
| Index

On this page:

autosave: autosavable<%>
do-autosave
autosave: register
autosave: restore-autosave-files/ gui

top ← prev up next →

### 2`` Autosave

autosave:autosavable<%> : interface?

Classes that implement this interface can be autosaved.

> ( send an-autosave:autosavable do-autosave ) → void

> This method is called when the object is registered to be autosaved (see autosave:register).

( autosave:register obj) → void?

obj

:

( and/c ( is-a?/c autosave:autosavable<%> )
( is-a?/c editor<%> ))

Adds obj to the list of objects to be autosaved. When it is time to autosave, the do-autosave method of the object is called. This method is responsible for performing the autosave.

There is no need to de-register an object because the autosaver keeps a “weak” pointer to the object; i.e., the autosaver does not keep an object from garbage collection.

( autosave:restore-autosave-files/gui ) → void?

Opens a GUI to ask the user about recovering any autosave files left around from crashes and things.

This function doesn’t return until the user has finished restoring the autosave files. (It uses yield to handle events however.)

top ← prev up next →