diff editor.js @ 25:4d87c38404d6

List literals, fixes to implicit self property lookup, import statement and editor improvements
author Mike Pavone <pavone@retrodev.com>
date Mon, 02 Apr 2012 22:28:48 -0700
parents 068d63627b16
children fe593c1df568
line wrap: on
line diff
--- a/editor.js	Tue Mar 27 00:39:32 2012 -0700
+++ b/editor.js	Mon Apr 02 22:28:48 2012 -0700
@@ -69,18 +69,25 @@
 strlit.prototype.toHTML = function(node) {
 	node.appendChild(newEl('span', {
 		className: 'string',
+		contentEditable: 'true',
 		textContent: this.val
 	}));
 };
 
 funcall.prototype.toHTML = function(node) {
+	var astNode = this;
 	var base = newEl('div', {
 		className: 'funcall'
 	});
 	var parts = this.name.split(':');
 	for (var i in parts ) {
 		if(parts[i]) {
-			base.appendChild(newEl('span', {textContent: parts[i] + ':', className: 'funpart'}));
+			base.appendChild(newEl('span', {
+				textContent: parts[i] + ':',
+				className: 'funpart',
+				onclick: function() {
+					return mainModule.funClick(this, astNode);
+				}}));
 			if (this.args[i]) {
 				this.args[i].toHTML(base);
 			}