Browse Source

Merge pull request #549 from herby/requirejs-wip

Cleaning in require.js code

Travis fails because cli is not yet working in requirejs
Herbert Vojčík 11 years ago
parent
commit
f9504b5608
9 changed files with 40 additions and 422 deletions
  1. 12 12
      js/Examples.deploy.js
  2. 13 13
      js/Examples.js
  3. 2 5
      js/Helios-Inspector.deploy.js
  4. 3 6
      js/Helios-Inspector.js
  5. 0 348
      js/amber.js
  6. 0 26
      js/init.js
  7. 3 3
      js/lib/amber-in-browser.js
  8. 6 6
      st/Examples.st
  9. 1 3
      st/Helios-Inspector.st

+ 12 - 12
js/Examples.deploy.js

@@ -1,6 +1,6 @@
 define(["smalltalk","nil","_st"], function(smalltalk,nil,_st){
 smalltalk.addPackage('Examples');
-smalltalk.addClass('Counterzzz', smalltalk.Widget, ['count', 'header'], 'Examples');
+smalltalk.addClass('Counter', smalltalk.Widget, ['count', 'header'], 'Examples');
 smalltalk.addMethod(
 smalltalk.method({
 selector: "decrease",
@@ -12,9 +12,9 @@ _st(self["@header"])._contents_((function(html){
 return smalltalk.withContext(function($ctx2) {
 return _st(html)._with_(_st(self["@count"])._asString());
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"decrease",{},smalltalk.Counterzzz)})},
+return self}, function($ctx1) {$ctx1.fill(self,"decrease",{},smalltalk.Counter)})},
 messageSends: ["-", "contents:", "with:", "asString"]}),
-smalltalk.Counterzzz);
+smalltalk.Counter);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -27,9 +27,9 @@ _st(self["@header"])._contents_((function(html){
 return smalltalk.withContext(function($ctx2) {
 return _st(html)._with_(_st(self["@count"])._asString());
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"increase",{},smalltalk.Counterzzz)})},
+return self}, function($ctx1) {$ctx1.fill(self,"increase",{},smalltalk.Counter)})},
 messageSends: ["+", "contents:", "with:", "asString"]}),
-smalltalk.Counterzzz);
+smalltalk.Counter);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -37,11 +37,11 @@ selector: "initialize",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-smalltalk.Counterzzz.superclass.fn.prototype._initialize.apply(_st(self), []);
+smalltalk.Counter.superclass.fn.prototype._initialize.apply(_st(self), []);
 self["@count"]=(0);
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Counterzzz)})},
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Counter)})},
 messageSends: ["initialize"]}),
-smalltalk.Counterzzz);
+smalltalk.Counter);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -66,9 +66,9 @@ $6=_st($5)._onClick_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._decrease();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.Counterzzz)})},
+return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.Counter)})},
 messageSends: ["with:", "asString", "h1", "yourself", "button", "onClick:", "increase", "decrease"]}),
-smalltalk.Counterzzz);
+smalltalk.Counter);
 
 
 smalltalk.addMethod(
@@ -78,9 +78,9 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 _st(self._new())._appendToJQuery_("body"._asJQuery());
-return self}, function($ctx1) {$ctx1.fill(self,"tryExample",{},smalltalk.Counterzzz.klass)})},
+return self}, function($ctx1) {$ctx1.fill(self,"tryExample",{},smalltalk.Counter.klass)})},
 messageSends: ["appendToJQuery:", "asJQuery", "new"]}),
-smalltalk.Counterzzz.klass);
+smalltalk.Counter.klass);
 
 
 });

+ 13 - 13
js/Examples.js

@@ -1,7 +1,7 @@
 define(["smalltalk","nil","_st"], function(smalltalk,nil,_st){
 smalltalk.addPackage('Examples');
-smalltalk.addClass('Counterzzz', smalltalk.Widget, ['count', 'header'], 'Examples');
-smalltalk.Counterzzz.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 new appendToJQuery: 'body' asJQuery";
+smalltalk.addClass('Counter', smalltalk.Widget, ['count', 'header'], 'Examples');
+smalltalk.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 new appendToJQuery: 'body' asJQuery";
 smalltalk.addMethod(
 smalltalk.method({
 selector: "decrease",
@@ -14,13 +14,13 @@ _st(self["@header"])._contents_((function(html){
 return smalltalk.withContext(function($ctx2) {
 return _st(html)._with_(_st(self["@count"])._asString());
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"decrease",{},smalltalk.Counterzzz)})},
+return self}, function($ctx1) {$ctx1.fill(self,"decrease",{},smalltalk.Counter)})},
 args: [],
 source: "decrease\x0a\x09count := count - 1.\x0a\x09header contents: [:html | html with: count asString]",
 messageSends: ["-", "contents:", "with:", "asString"],
 referencedClasses: []
 }),
-smalltalk.Counterzzz);
+smalltalk.Counter);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -34,13 +34,13 @@ _st(self["@header"])._contents_((function(html){
 return smalltalk.withContext(function($ctx2) {
 return _st(html)._with_(_st(self["@count"])._asString());
 }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"increase",{},smalltalk.Counterzzz)})},
+return self}, function($ctx1) {$ctx1.fill(self,"increase",{},smalltalk.Counter)})},
 args: [],
 source: "increase\x0a\x09count := count + 1.\x0a\x09header contents: [:html | html with: count asString]",
 messageSends: ["+", "contents:", "with:", "asString"],
 referencedClasses: []
 }),
-smalltalk.Counterzzz);
+smalltalk.Counter);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -49,15 +49,15 @@ category: 'initialization',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-smalltalk.Counterzzz.superclass.fn.prototype._initialize.apply(_st(self), []);
+smalltalk.Counter.superclass.fn.prototype._initialize.apply(_st(self), []);
 self["@count"]=(0);
-return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Counterzzz)})},
+return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Counter)})},
 args: [],
 source: "initialize\x0a\x09super initialize.\x0a\x09count := 0",
 messageSends: ["initialize"],
 referencedClasses: []
 }),
-smalltalk.Counterzzz);
+smalltalk.Counter);
 
 smalltalk.addMethod(
 smalltalk.method({
@@ -83,13 +83,13 @@ $6=_st($5)._onClick_((function(){
 return smalltalk.withContext(function($ctx2) {
 return self._decrease();
 }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
-return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.Counterzzz)})},
+return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.Counter)})},
 args: ["html"],
 source: "renderOn: html\x0a\x09header := html h1\x0a\x09with: count asString;\x0a\x09yourself.\x0a\x09html button\x0a\x09with: '++';\x0a\x09onClick: [self increase].\x0a\x09html button\x0a\x09with: '--';\x0a\x09onClick: [self decrease]",
 messageSends: ["with:", "asString", "h1", "yourself", "button", "onClick:", "increase", "decrease"],
 referencedClasses: []
 }),
-smalltalk.Counterzzz);
+smalltalk.Counter);
 
 
 smalltalk.addMethod(
@@ -100,13 +100,13 @@ fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
 _st(self._new())._appendToJQuery_("body"._asJQuery());
-return self}, function($ctx1) {$ctx1.fill(self,"tryExample",{},smalltalk.Counterzzz.klass)})},
+return self}, function($ctx1) {$ctx1.fill(self,"tryExample",{},smalltalk.Counter.klass)})},
 args: [],
 source: "tryExample\x0a\x09\x22In order to play with the Counter, just select the\x0a\x09doit below and press the Do it button. Then take a\x0a\x09look in the HTML document above the IDE.\x22\x0a\x0a\x09\x22Counter tryExample\x22\x0a\x09\x09self new appendToJQuery: 'body' asJQuery",
 messageSends: ["appendToJQuery:", "asJQuery", "new"],
 referencedClasses: []
 }),
-smalltalk.Counterzzz.klass);
+smalltalk.Counter.klass);
 
 
 });

+ 2 - 5
js/Helios-Inspector.deploy.js

@@ -788,12 +788,9 @@ selector: "refresh",
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=self;
-_st($1)._refreshVariablesWidget();
-$2=_st($1)._refreshDisplayWidget();
+self._inspect_(self._inspectee());
 return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLInspectorWidget)})},
-messageSends: ["refreshVariablesWidget", "refreshDisplayWidget"]}),
+messageSends: ["inspect:", "inspectee"]}),
 smalltalk.HLInspectorWidget);
 
 smalltalk.addMethod(

+ 3 - 6
js/Helios-Inspector.js

@@ -1054,14 +1054,11 @@ category: 'actions',
 fn: function (){
 var self=this;
 return smalltalk.withContext(function($ctx1) { 
-var $1,$2;
-$1=self;
-_st($1)._refreshVariablesWidget();
-$2=_st($1)._refreshDisplayWidget();
+self._inspect_(self._inspectee());
 return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.HLInspectorWidget)})},
 args: [],
-source: "refresh\x0a\x09self \x0a\x09\x09refreshVariablesWidget;\x0a\x09\x09refreshDisplayWidget",
-messageSends: ["refreshVariablesWidget", "refreshDisplayWidget"],
+source: "refresh\x0a\x09self inspect: self inspectee",
+messageSends: ["inspect:", "inspectee"],
 referencedClasses: []
 }),
 smalltalk.HLInspectorWidget);

+ 0 - 348
js/amber.js

@@ -1,348 +0,0 @@
-/* Amber package loading
-   usage example:
-   amber.load({
-   files: ['MyCategory1.js', 'MyCategory2.js'],
-   ready: function() {smalltalk.Browser._open()}
-   })
-*/
-
-amber = (function() {
-	var that = {};
-
-	var scripts = document.getElementsByTagName("script");
-	var src     = scripts[ scripts.length - 1 ].src;
-	var home    = resolveViaDOM(src).replace(/[^\/]+\/[^\/]+$/, "");
-
-	var debug;
-	var deploy;
-
-	var spec;
-	var jsToLoad = [];
-	var loadJS;
-	var nocache = '';
-
-	function resolveViaDOM(url) {
-		var a = document.createElement("a");
-		a.href = url;
-		return a.href;
-	}
-	
-	that.load = function(obj) {
-		spec = obj || {};
-
-		// In deployment mode, only the compressed version of Kernel
-		// and Canvas are loaded
-		deploy = spec.deploy || false;
-		debug = spec.debug || false;
-
-		// When debug is turned on, logs are written to the console,
-		// and the user will be prompted before they leave the page.
-		if (debug) {
-			window.onbeforeunload = function(){ return 'You will loose all code that you have not committed'; };
-		}
-
-		// Allow loading default Amber files from a different location
-		// e.g. http://amber-lang.net/amber/
-		if (spec.home) home = spec.home;
-
-		// Specify a version string to avoid wrong browser caching
-		if (spec.version) {
-			nocache = '?' + spec.version;
-		}
-
-		loadDependencies();
-		addJSToLoad('js/lib/es5-shim-2.0.2/es5-shim.min.js');
-		addJSToLoad('js/lib/es5-shim-2.0.2/es5-sham.min.js');
-		addJSToLoad('js/boot.js');
-
-		if (deploy) {
-			loadPackages([
-				'Kernel-Objects.deploy',
-				'Kernel-Classes.deploy',
-				'Kernel-Methods.deploy',
-				'Kernel-Collections.deploy',
-				'Kernel-Exceptions.deploy',
-				'Kernel-Transcript.deploy',
-				'Kernel-Announcements.deploy',
-				'Canvas.deploy'
-			]);
-		} else {
-			loadIDEDependencies();
-			loadCSS('amber.css');
-
-			loadPackages([
-				'Kernel-Objects',
-				'Kernel-Classes',
-				'Kernel-Methods',
-				'Kernel-Collections',
-				'Kernel-Exceptions',
-				'Kernel-Transcript',
-				'Kernel-Announcements',
-				'Canvas',
-				'SUnit',
-				'Importer-Exporter',
-				'Compiler-Exceptions',
-				'Compiler-Core',
-				'Compiler-AST',
-				'Compiler-Semantic',
-				'Compiler-IR',
-				'Compiler-Inlining',
-				'Compiler-Interpreter',
-				'Compiler-Tests',
-				'parser',
-				'IDE',
-				'Examples',
-				'Benchfib',
-				'Kernel-Tests',
-				'SUnit-Tests'
-			]);
-		}
-
-		var additionalFiles = spec.packages || spec.files;
-		if (additionalFiles) {
-			that.commitPath = loadPackages(additionalFiles, spec.prefix, spec.packageHome);
-		}
-
-		// Be sure to setup & initialize smalltalk classes
-		addJSToLoad('js/init.js');
-		initializeSmalltalk();
-	};
-
-	function loadPackages(names, prefix, urlHome){
-		var name;
-		prefix = prefix || 'js';
-		urlHome = urlHome || home;
-
-		for (var i=0; i < names.length; i++) {
-			name = names[i].split(/\.js$/)[0];
-			addJSToLoad(name + '.js', prefix, urlHome);
-		}
-
-		return  {
-			js: urlHome + prefix,
-			st: urlHome + (prefix.match(/\/js$/) ? prefix.replace(/\/js$/, "/st") : "st")
-		};
-	}
-
-	function addJSToLoad(name, prefix, urlHome) {
-		urlHome = urlHome || home;
-		jsToLoad.push(buildJSURL(name, prefix, urlHome));
-	}
-
-	function resolve(base, path) {
-		if (/(^|:)\/\//.test(path)) {
-			// path: [http:]//foo.com/bar/; base: whatever/
-			// -> http://foo.com/bar/
-			return path;
-		}
-		if (!/^\//.test(path)) {
-			// path: relative/; base: whatever/
-			// -> whatever/relative/
-			return base + path;
-		}
-		var match = base.match(/^(([^:/]*:|^)\/\/[^/]*)/);
-		if (match) {
-			// path: /absolute/; base: [http:]//foo.com/whatever/
-			// -> [http:]//foo.com/absolute/
-			return match[1] + path;
-		}
-		// path: /absolute/; base: whatever/path/
-		// -> /absolute/
-		return path;
-	}
-
-	function buildJSURL(name, prefix, urlHome) {
-		prefix = prefix ? prefix + '/' : '';
-		urlHome = urlHome || home;
-
-		var parts = name.match(/^(.*\/)([^/]*)$/);
-		if (parts) {
-			name = parts[2];
-			urlHome = resolve(urlHome, parts[1]);
-		}
-
-		if (!deploy) {
-			name = name + nocache;
-		}
-
-		return urlHome + prefix + name;
-	}
-
-	function loadCSS(name, prefix) {
-		prefix = prefix || 'css';
-		if (!deploy) {
-			name = name + nocache;
-		}
-
-		var url = home + prefix + '/' + name;
-
-		var link = document.createElement("link");
-		link.setAttribute("rel", "stylesheet");
-		link.setAttribute("type", "text/css");
-		link.setAttribute("href", url);
-		document.getElementsByTagName("head")[0].appendChild(link);
-	}
-
-	function loadDependencies() {
-		if (typeof jQuery == 'undefined') {
-			addJSToLoad('js/lib/jQuery/jquery-1.8.2.min.js');
-		}
-
-		if ((typeof jQuery == 'undefined') || (typeof jQuery.ui == 'undefined')) {
-			addJSToLoad('js/lib/jQuery/jquery-ui-1.8.16.custom.min.js');
-		}
-	}
-
-	function loadIDEDependencies() {
-		addJSToLoad('js/lib/jQuery/jquery.textarea.js');
-		addJSToLoad('js/lib/CodeMirror/codemirror.js');
-		addJSToLoad('js/lib/CodeMirror/smalltalk.js');
-		addJSToLoad('js/lib/CodeMirror/addon/hint/show-hint.js');
-		loadCSS('lib/CodeMirror/codemirror.css', 'js');
-		loadCSS('lib/CodeMirror/theme/ambiance.css', 'js');
-		loadCSS('lib/CodeMirror/addon/hint/show-hint.css', 'js');
-		loadCSS('lib/CodeMirror/amber.css', 'js');
-	}
-
-	// This will be called after JS files have been loaded
-	function initializeSmalltalk() {
-		that.smalltalkReady = function(smalltalk,nil,_st) {
-			if (spec.ready) {
-				spec.ready(smalltalk,nil,_st);
-			}
-			evaluateSmalltalkScripts();
-		};
-
-		loadAllJS();
-	}
-
-	/*
-	 * When loaded using AJAX, scripts order not guaranteed.
-	 * Load JS in the order they have been added using addJSToLoad().
-	 * If loaded, will use jQuery's getScript instead of adding a script element
-	 */
-	function loadAllJS() {
-		loadJS = loadJSViaScriptTag;
-		if (typeof jQuery != 'undefined') {
-			loadJS = loadJSViaJQuery;
-		}
-		loadNextJS();
-	}
-
-	function loadNextJS() {
-		loadJS(jsToLoad[0], function(){
-			jsToLoad.shift();
-			if (jsToLoad.length > 0) {
-				loadNextJS();
-			}
-		});
-	}
-
-	function loadJSViaScriptTag(url, callback) {
-		writeScriptTag(url);
-		callback();
-	}
-
-	function loadJSViaJQuery(url, callback) {
-		// The order of loading is as specified, but order of execution may get wrong
-		// (observed when loading amber in testing environment using zombiejs).
-		// jQuery's getScript/get/ajax does not give any guarantee as to the order of execution.
-		// The callback is called after the file is fully load, but it may not have been executed.
-		// When given a small timeout between ending previous loading and start of next loading,
-		// it is very probable that the time window is used to actually start executing the script.
-		$.ajax({
-			dataType: "script",
-			url: url,
-			cache: deploy,
-			success: function () { setTimeout(callback, 5); }
-		});
-	}
-
-	function writeScriptTag(src) {
-		var scriptString = '<script src="' + src + '" type="text/javascript"></script>';
-		document.write(scriptString);
-	}
-
-	function evaluateSmalltalkScripts() {
-		jQuery(document).ready(function() {
-			jQuery('script[type="text/smalltalk"]').each(function(i, elt) {
-				smalltalk.Compiler._new()._evaluateExpression_(jQuery(elt).html());
-			});
-		});
-	}
-
-	var localPackages;
-
-	function populateLocalPackages(){
-		var localStorageRE = /^smalltalk\.packages\.(.*)$/;
-		localPackages = {};
-
-		var match, key;
-
-		for(var i=0; i < localStorage.length; i++) {
-			key = localStorage.key(i);
-
-			if (match = key.match(localStorageRE)) {
-				localPackages[match[1]] = localStorage[key];
-			}
-		}
-
-		return localPackages;
-	}
-
-	function clearLocalPackages() {
-		for (var name in localPackages) {
-			log('Removing ' + name + ' from local storage');
-			localStorage.removeItem('smalltalk.packages.' + name);
-		}
-	}
-
-	function log(string) {
-		if (debug) {
-			console.log(string);
-		}
-	}
-
-	that.loadHelios = function() {
-		loadCSS('helios_frame.css');
-		var frame = jQuery('<div id="helios"><iframe frameborder=0 src="' + home + 'helios.html"></iframe></div>');
-	
-		jQuery('body').append(frame);
-		jQuery(frame).resizable({
-			handles: 'n',
-			start: onResizeStart,
-			stop: onResizeStop,
-			resize: onResize
-		});
-	
-		function onResize() {
-			jQuery('#helios')
-				.css('top', '')
-				.css('width', '100%')
-				.css('bottom', '0px');
-		}
-	
-		function onResizeStart() {
-			jQuery('#helios').append('<div class="overlay"></div>');
-		}
-	
-		function onResizeStop() {
-			jQuery('#helios').find('.overlay').remove();
-		}
-	};
-
-	that.popupHelios = function() {
-		window.open(home + 'helios.html', "Helios", "menubar=no, status=no, scrollbars=no, menubar=no, width=1000, height=600");
-	};
-
-	return that;
-})();
-
-window.loadAmber  = amber.load;
-window.loadHelios = amber.loadHelios;
-window.popupHelios = amber.popupHelios;
-
-// Backward compatibility
-function toggleAmberIDE () {
-	return smalltalk.TabManager._toggleAmberIDE();
-}

+ 0 - 26
js/init.js

@@ -1,26 +0,0 @@
-(function (smalltalk,nil,_st) {
-    var inBrowser = typeof amber !== "undefined" && typeof amber.load === "function";
-    function init() {
-        smalltalk.initialize();
-
-        /* Similar to jQuery(document).ready() */
-
-        if (inBrowser && amber.smalltalkReady) {
-            amber.smalltalkReady(smalltalk,nil,_st);
-        }
-    }
-
-    if (inBrowser) {
-        // init is lengthy process done in JavaScript.
-        // setTimeout here postpones it, so DOM ready
-        // event can occur sooner, thus load process
-        // may appear optically faster.
-        setTimeout(init, 0);
-    } else {
-        // In certain configurations, setTimeout is not feasible.
-        // It is mainly for `amberc`-produced concatenated
-        // node.js programs. There, the actual "main" appears
-        // immediately after init, so it must happens synchronously.
-        init();
-    }
-})(global_smalltalk,global_nil,global__st);

+ 3 - 3
js/lib/amber-in-browser.js

@@ -45,7 +45,7 @@ require = function (require) {
                 exports: 'console'
             },
             'amber/Kernel-Objects.deploy': {
-                deps: [ 'smalltalk', 'nil', '_st' ]
+                deps: []
             },
             'amber/Kernel-Classes.deploy': {
                 deps: [ 'amber/Kernel-Objects.deploy' ]
@@ -69,7 +69,7 @@ require = function (require) {
                 deps: [ 'amber/Kernel-Objects.deploy' ]
             },
              'amber/Kernel-Objects': {
-                deps: [ 'smalltalk', 'nil', '_st' ]
+                deps: []
             },
             'amber/Kernel-Classes': {
                 deps: [ 'amber/Kernel-Objects' ]
@@ -120,7 +120,7 @@ require = function (require) {
                 deps: [ 'amber/Compiler-Core' ]
             },
             'amber/parser': {
-                deps: [ 'smalltalk' ]
+                deps: []
             },
             'amber/IDE': {
                 deps: [ 'amber/Canvas', 'amber/Kernel-Exceptions' ]

+ 6 - 6
st/Examples.st

@@ -1,15 +1,15 @@
 Smalltalk current createPackage: 'Examples'!
-Widget subclass: #Counterzzz
+Widget subclass: #Counter
 	instanceVariableNames: 'count header'
 	package: 'Examples'!
-!Counterzzz commentStamp!
+!Counter commentStamp!
 This is a trivial Widget example mimicking the classic Counter example in Seaside.
 In order to play with it, just evaluate the doit below in a workspace.
 Then take a look in the HTML document above the IDE.
 
 		Counter new appendToJQuery: 'body' asJQuery!
 
-!Counterzzz methodsFor: 'actions'!
+!Counter methodsFor: 'actions'!
 
 decrease
 	count := count - 1.
@@ -21,14 +21,14 @@ increase
 	header contents: [:html | html with: count asString]
 ! !
 
-!Counterzzz methodsFor: 'initialization'!
+!Counter methodsFor: 'initialization'!
 
 initialize
 	super initialize.
 	count := 0
 ! !
 
-!Counterzzz methodsFor: 'rendering'!
+!Counter methodsFor: 'rendering'!
 
 renderOn: html
 	header := html h1
@@ -42,7 +42,7 @@ renderOn: html
 	onClick: [self decrease]
 ! !
 
-!Counterzzz class methodsFor: 'example'!
+!Counter class methodsFor: 'example'!
 
 tryExample
 	"In order to play with the Counter, just select the

+ 1 - 3
st/Helios-Inspector.st

@@ -312,9 +312,7 @@ observeVariablesWidget
 !
 
 refresh
-	self 
-		refreshVariablesWidget;
-		refreshDisplayWidget
+	self inspect: self inspectee
 !
 
 refreshDisplayWidget