| Search Locate Previous Next | Contents |
Description
Offers Windows-standard behaviour on File-Open etc. To use this object, you will need to set the current file name as data, the filebox prompt as specification, and then field a number of events in the Behaviour table.
The actions will be called automatically, depending on the results from previous actions, and the state of the system, for example whether a file of the same name is already on disk. The NOSE events you should handle are:
ASK - ¾ is the data dirty GET - YourReadFunction ¾ PUT - YourWrite Function ¾ ZAP - YourClearFunction
ASK is optional if you do not record the fact that the user has modified some data since the last GET, a good safety feature would be to include ¾1 here so that the application always prompts Do you want to save? on exit.
Typically you will invoke the NOSE from your File menu, for example:
&Open: nose Do 'Open'
A good place for the Exit call is on the Close Request on your main form as it returns zero if the user cancels ...
CR: 0=nose Do 'Exit : Reject : :
Class Property Table
| Name | Type | Default | Description |
| File name | User | Current File Name | |
| Specification | Runtime | File Prompt (*.ext Application name ) |
Class-specific Events
| ASK | Am I dirty? |
| PUT | Save this File! |
| GET | Open this File! |
| ZAP | Clear this Workspace! |
Class-specific Functions
| Exit | Handles all that needs to happen on File/Exit |
| Save | Handles all that needs to happen on File/Save |
| SaveAs | Handles all that needs to happen on File/SaveAs |
| New | Handles all that needs to happen on File/New |
| Open | Handles all that needs to happen on File/Open |
| SetNewName | Sets name for next new file |
| FileExists | Check if file is already there |
| SetDirectory | Set search directory for File,Open |
| SetSaveMsg | Replace the default save file? prompt |
| SetReplMsg | Replace the default overwrite? warning |