Download Latest Version Code as of 2014-06-01 - Almost done, language working.zip (247.3 kB)
Email in envelope

Get an email when there's a new version of Web Page UI Tool

Home
Name Modified Size InfoDownloads / Week
Code as of 2014-06-01 - Almost done, language working.zip 2014-06-02 247.3 kB
README 2012-06-29.txt 2012-06-30 4.7 kB
WebPageUITool 2012-06-29.zip 2012-06-30 252.2 kB
README 2012-06-10.txt 2012-06-11 4.7 kB
wpuitool_2012-06-10_11pm.zip 2012-06-11 320.8 kB
wpuitool_ 2011-05-26_1217am.zip 2011-06-05 327.9 kB
wpuitool.zip 2011-01-28 85.4 kB
README.txt 2011-01-01 3.8 kB
Totals: 8 Items   1.2 MB 0
Copyright (c) 2010, Jocelyn Granger
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of Jocelyn Granger nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

----------------------------------------

(This is incomplete, pre-alpha code.)

Web Page UI Tool is a tool that uses web pages as the user interface.  It lets you create a template of text, store that template in an HTML 5 browser database, then call up that template and use it.

This first version of the tool makes it easier to write code, by writing some of the characters in the code for you.  However I'm keeping the tool as generic as I can, to leave open the possibility of using the tool in other ways.

First you select a code template's label.  The template contains most characters in a standard piece of code.  There might be a special placeholder character in the template.  This placeholder character is in the place of code that is specific to the code you are writing (ex: a variable name).

For example, a template might be code to create a file and then make sure that the file was successfully created.  The standard code to do this would be in the template, except there would be a placeholder character in the place of each of the variable names.

After you select the template's label, the template appears in the web page.  You copy that code to your text editor, select the next placeholder character, and replace it with your variable name.

The sample templates that come with the tool are very simple.  However you can write much more complicated templates, including multi-line templates.

The web page lets you click on a button to get code from the file in which you are writing code (ex: an Xcode file).  If you click on that button, then
- an AppleScript will read the code that is currently in the code development file,
- the AppleScript will send the code to the web page,
- a JavaScript in the web page will look through the code for tokens that look like variable names,
- a JavaScript will create a button for each variable name,
- a JavaScript will label each button with the variable's name and
- a JavaScript will put the buttons on the web page.
If you click on one of those buttons, then the variable name for that button will be written to the buffer in the web page.

I'm also working on writing the contents of the buffer area of the web page to the code development file, using AppleScript and JavaScript.  That part is almost done.

I have a lot more work to do - add preferences and default values, let the user change and delete individual templates, etc.  Also I have to clean up the code quite a bit.  (This first version is pre-alpha.)

I have tested the tool only on an iMac G5, running Safari 5.0.3 on Mac OS X version 10.5.8.  I'll test the tool on other platforms later.

You must run the tool on an HTML 5 web browser that uses SQLite to store data into a database.  (The database has to be SQLite.  I wrote the tool's SQL for SQLite, and SQLite has a slightly different SQL syntax from other databases.)

To start the tool,
1) create a folder called "js",
2) put the JavaScript files (files whose names end with ".js") into the js folder,
3) put the js folder, wpuitool.css and index.html all into the same folder,
4) make sure that JavaScript is enabled in your web browser, and
5) display index.html in your web browser.

-------

June 29, 2012 - Improved the AppleScripts
Source: README 2012-06-29.txt, updated 2012-06-30