rem: textarea.buttonEvents[buttonArray[buttonIndex].keynum] = function() { buttonArray[buttonIndex].action(buttonArray[buttonIndex].tag, textarea); 
add: textarea.buttonEvents[buttonArray[buttonIndex].keynum] = new Object(); textarea.buttonEvents[buttonArray[buttonIndex].keynum].tag = buttonArray[buttonIndex].tag; textarea.buttonEvents[buttonArray[buttonIndex].keynum].action = buttonArray[buttonIndex].action; textarea.buttonEvents[buttonArray[buttonIndex].keynum].runme = function() { if (this.action == 'bbCode') { bbCode(this.tag, textarea); } else if (this.action == 'bbcURL') { bbcURL(this.tag, textarea); } 
context: 	textarea.buildButtons = function(buttonArray) {		// Builds the buttons before the text area based on the information in the array		var bbCodeButtons = document.createElement("div");		bbCodeButtons.id = 'qsf_bbcode_buttons';				var oldButtonIndex = 0;				for (var buttonIndex in buttonArray) {			// Check if we want to add a break			if (buttonArray[buttonIndex].action == 'bbcFont' && 					buttonArray[oldButtonIndex].action != 'bbcFont') {				bbCodeButtons.appendChild(document.createElement("br"));					}						var button = null;					if (buttonArray[buttonIndex].action == 'bbcFont') {				button = createSelect(buttonArray[buttonIndex], textarea);			} else {				button = createButton(buttonArray[buttonIndex], textarea);			}			bbCodeButtons.appendChild(button);						// If there is a keynum attached then add that to our events array			if (buttonArray[buttonIndex].keynum) {				textarea.buttonEvents[buttonArray[buttonIndex].keynum] = function() {					buttonArray[buttonIndex].action(buttonArray[buttonIndex].tag, textarea);				};			}						oldButtonIndex = buttonIndex;		}		bbCodeButtons.appendChild(document.createElement("br"));				textarea.parentNode.insertBefore(bbCodeButtons, textarea);	};
meta: 7771	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7771/7fdfcb9e43b9eefbdf28615c72105456e5d5a38f/postboxplain.js/clean/trunk/qsf/javascript/postboxplain.js