|
@@ -2,18 +2,18 @@ define(["amber/boot", "amber/web/Web"], function($boot){"use strict";
|
|
if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
|
|
if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
|
|
var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
|
|
var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
|
|
if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
|
|
if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
|
|
-$core.addPackage('Examples');
|
|
|
|
|
|
+$core.addPackage("Examples");
|
|
$core.packages["Examples"].innerEval = function (expr) { return eval(expr); };
|
|
$core.packages["Examples"].innerEval = function (expr) { return eval(expr); };
|
|
$core.packages["Examples"].transport = {"type":"amd","amdNamespace":"amber/legacy"};
|
|
$core.packages["Examples"].transport = {"type":"amd","amdNamespace":"amber/legacy"};
|
|
|
|
|
|
-$core.addClass('Counter', $globals.Widget, ['count', 'header'], 'Examples');
|
|
|
|
|
|
+$core.addClass("Counter", $globals.Widget, ["count", "header"], "Examples");
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
$globals.Counter.comment="This is a trivial Widget example mimicking the classic Counter example in Seaside.\x0aIn order to play with it, just evaluate the doit below in a workspace.\x0aThen take a look in the HTML document above the IDE.\x0a\x0a\x09\x09Counter tryExample";
|
|
$globals.Counter.comment="This is a trivial Widget example mimicking the classic Counter example in Seaside.\x0aIn order to play with it, just evaluate the doit below in a workspace.\x0aThen take a look in the HTML document above the IDE.\x0a\x0a\x09\x09Counter tryExample";
|
|
//>>excludeEnd("ide");
|
|
//>>excludeEnd("ide");
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "decrease",
|
|
selector: "decrease",
|
|
-protocol: 'actions',
|
|
|
|
|
|
+protocol: "actions",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
@@ -46,7 +46,7 @@ $globals.Counter);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "increase",
|
|
selector: "increase",
|
|
-protocol: 'actions',
|
|
|
|
|
|
+protocol: "actions",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
@@ -79,7 +79,7 @@ $globals.Counter);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "initialize",
|
|
selector: "initialize",
|
|
-protocol: 'initialization',
|
|
|
|
|
|
+protocol: "initialization",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
@@ -111,7 +111,7 @@ $globals.Counter);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "renderOn:",
|
|
selector: "renderOn:",
|
|
-protocol: 'rendering',
|
|
|
|
|
|
+protocol: "rendering",
|
|
fn: function (html){
|
|
fn: function (html){
|
|
var self=this;
|
|
var self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
@@ -173,7 +173,7 @@ $globals.Counter);
|
|
$core.addMethod(
|
|
$core.addMethod(
|
|
$core.method({
|
|
$core.method({
|
|
selector: "tryExample",
|
|
selector: "tryExample",
|
|
-protocol: 'example',
|
|
|
|
|
|
+protocol: "example",
|
|
fn: function (){
|
|
fn: function (){
|
|
var self=this;
|
|
var self=this;
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|