This is an effort to make the best out of what Microsoft gave us 'out of the box' with Windows RT as far as on-device scripting and coding.
I have about 40 sample programs which you can load by looking in the samples subdirectory. Your programs can do simple file I/O as well (save text files or serialize json objects as text files and load them later)... if you are running hosted or appcached version you can use localstorage and/or indexedDB as well.
Now Hosted on GitHub at :
(Updated to version 1.88)
- CodeMirror Search enabled
- Added Babylon.js, moment.js, and jsoneditor.js libraries with samples
- API_Restore_TridentDB() now refreshes the trident save slot list
- Added 'Days Since/Days Until' sample app and Streaming Radio for x86 (wmp embed)
- Added Hierarchical Encrypted Notes editor app
- Added Json Databank (dynamic json database app)
- Local FS now shows Samples Browser button for accessing those samples online
- TridentList added functions for setting list item as html
There are two ways to install Trident Sandbox and both offer advantages over the other so you may want both:
(1) Run off Local Filesystem. For this method, you can just download the attached zip, then right click on it and choose properties and unblock it. Then extract it... when its done you can double click the TridentSandbox.htm file or drag and drop the .htm file onto your desktop Internet Explorer and then make it a favorite. Running off local filesystem you have the ability to make web requests to the internet to grab data.
(2) AppCache install. For this method you just visit this page : http://www.obeliskos.com/TridentSandbox . Wait until the AppCache status changes from 'Downloading' to 'Idle' and then the site will continue to run this 'cached' version indefinitely (even if you have no internet connectivity). Running using this method you cannot make internet request but you can use LocalStorage and IndexedDB... two very useful storage mechanisms.
There is a workaround for making ajax requests using the AppCached install, which may or may not be appropriate for your particular concerns. It is described in the 'Making Data Requests in Hosted/AppCached environment' section of this help page : http://www.obeliskos.com/TridentSand...ndAppCache.htm
Upgrading an AppCache version :
If you already have an AppCache for an older version of TridentSandbox, you can upgrade to the latest version using either of the following two methods. (1) go into internet options/settings/caches and databases and delete the old obeliskos.com entry, then revisit the site at link below. If you want to preserve the data you have stored in the TridentDB/IndexedDB, you can visit the site using the desktop Internet Explorer and it will show 'Downloading' and then 'Update Ready', then press F12. This brings up the developer's tools from which you go to the console and type applicationCache.swapCache() and then reload the page... you should be updated.
Additionally (for users of my AppCache site) : When using an appcache website while online it will check for updates by downloading the appcache.mf manifest file... if that file does not exist and the response code is something like file not found, then the appcache will be invalidated. So if you expect/want the appcache site to work even after I may have taken the site down (which I have no intention of doing anytime soon), then you might want to host block the site in your windows hosts file. I believe it would run forever in that mode with no online dependencies (or updates). If you see I have created a new update, you can unblock it to update. The version which is downloaded and run from local filesystem has no such dependencies so this does not apply to the zip download install.
There are also now a few keyboard shortcuts usable within editor controls :
Alt+Q : Toggle Markup Maximize
Alt+W : Toggle Script Maximize
Alt+R : Run Program
Alt+S : Save (File API)
Alt+I : Inspect highlighted object
Hosting your own TridentSandbox Server :
You don't need to do this since I offer my own webserver, but if you want to can can host TridentSandbox on your own website. If you just want to host the files on a server of your own and do not need appcache functionality, then edit the TridentSandbox.htm main page and find (near the beginning of the file) the HTML tag and remove the reference to appcache.mf. If you want to use appcache, then leave the html tag at its default. You might need to register mime types for .mf files (text/cache-manifest) and .prg files (application/json). The newly added Awesome Fonts library may also need mime types configured for a few fonts, you can either add these mime types or remove them from the appcache.mf file (and lose offline support for those). You should be able to use F12 on the desktop IE and monitor the Debugger window as it downloads the appcache and if it fails it will usually tell you the file it had trouble with.
Within TridentSandbox, there are Help pages which provide much better overall information.
To install local filesystem version :
- Download TridentSandbox.zip to an area like your Documents or Downloads folder.
- IMPORTANT : If you are on Windows RT, Windows 8 or 8.1, right click on the downloaded zip file and choose properties... it may say the file came from the web and give you an option to unblock it... unblock it. Then extract it. If you already extracted it you can right click on the TridentSandbox.htm file choose properties and it will have same option to unblock it... so unblock it.
- Go into the newly extracted directory and run TridentSandbox.htm (it will run in either metro or desktop ie, but I prefer desktop ie, which in that case you might need to drag and drop the htm file onto desktop ie program to load (then bookmark).
- If it asks you to enable scripts, choose yes
- You can load samples which are located in the samples subfolder.
- You can save samples into that folder as well as anywhere else... like SkyDrive. Files manually loaded and saved can be located anywhere but assets referenced as urls within your programs need to be in folder hierarchy (at or below the Trident Sandbox web page you loaded).