This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
sandals /
| name | age | message | |
|---|---|---|---|
| |
COPYING | ||
| |
README | ||
| |
beachhouse/ | ||
| |
run.sh | ||
| |
samples/ | ||
| |
sandals.js | ||
| |
tests/ |
README
Sandals
a JavaScript pair to walk to the
Beach House
(a Java-based graphical toolkit)
== What is Sandals? ==
Sandals is a GUI (Graphical User Interface) toolkit based on _why's
Shoes toolkit. It is a collection of JVM-based language interfaces to
Beach House.
== What is BeachHouse? ==
The Java part of Sandals where all the components and drawing methods
are defined. It tries to incorporate all of the Shoes toolkit
components. If it fails, magic in the scripting language (such as
JavaScript or JRuby) can be used to smooth things over and make the
interface appear as clean as possible.
=== Using BeachHouse with JavaScript ===
Sandals.js is the interface to Beach House. It creates a global `app`
object that contains:
- name: the name of the application window
- location: the location where the application is running
To create a Sandals application:
1. Load Sandals.js:
load("sandals.js");
2. Use the JavaScript `with` statement with the global Sandals object:
with (Sandals) {
// Step 3 goes here
}
3. Within the body of the `with` statement, call the `go` function of
the `Sandals` object with a function as an argument.
Whatever function you pass to `go`, it should accept no arguments.
go(function () {
// Step 4 goes here
}
);
4. Write up the body of the function. In this function, you have access
to the global `app` object and any other variables in the global
`Sandals` object:
para("Woah, Sandals.js works!");
5. The final result looks like this:
load("sandals.js");
with (Sandals) {
go(function () {
para("Woah, Sandals.js works!");
}
);
}
=== Using BeachHouse with JRuby ===







