Warning when loading new workspace

General APL language issues
Post Reply
User avatar
jmosk
Posts: 69
Joined: Thu Jul 18, 2013 5:15 am

Warning when loading new workspace

Post by jmosk »

Is there an option to set so that there is a warning if you are loading a new workspace after you have created new functions in the current workspace but have not saved them? In forgetting to save my workspace before loading a new one, I lost a days worth of work that I forgot to save (got busy with something else and never saved it before walking away).
+←--------------------------------------------------------------→
+ Jay Moskowitz
+←--------------------------------------------------------------→
+ http://www.linkedin.com/in/jay-moskowitz-5745b83
+
User avatar
Phil Last
Posts: 628
Joined: Thu Jun 18, 2009 6:29 pm
Location: Wessex

Re: Warning when loading new workspace

Post by Phil Last »

I'm loath to recommend it as I've written and use what I think is a better alternative but that isn't currently available for public use so for now I'd suggest you look at SALT.

Both SALT and my offering utilise a facility embedded in the function editor that, on exit, signals an event that can be enabled to force an autosave to file of each and every change you make.

Others may be able to help with SALT. I'm afraid I don't know how to make it work.
DanB|Dyalog

Re: Warning when loading new workspace

Post by DanB|Dyalog »

As Phil suggested, SALT is probably a good alternative or a complement to workspace usage.
To save a scripted namespace or program simply use ]save (not )SAVE ).
The full syntax is
]save objectname \path\to\location
For ex to save fn BIGJOB in path \all\my\apl\code\bigjob you would type
]save BIGJOB \all\my\apl\code\bigjob
You can even use version numbers if you -version at the end.
Once saved a la SALT (this ]save syntax is a cover for the SALT fn to Save an APL object) the object may be resaved after you edit it.
If you forget to )SAVE you workspace you can retrieve your object by doing
]load \path\to\your\object

To list all the available commands type
]?
To see help on a specific command, e.g. save, type
]?save

Hope this helps
/Dan
Post Reply