[Sciviews-commits] r555 - in komodo: . SciViews-K SciViews-K/.komodotools SciViews-K/content SciViews-K/content/js SciViews-K/defaults SciViews-K/skin SciViews-K/skin/icons/misc SciViews-K/skin/images SciViews-K-dev/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 5 13:36:34 CET 2015


Author: phgrosjean
Date: 2015-02-05 13:36:34 +0100 (Thu, 05 Feb 2015)
New Revision: 555

Removed:
   komodo/SciViews-K-dev/R/captureAll.R
   komodo/SciViews-K-dev/R/parseText.R
Modified:
   komodo/.DS_Store
   komodo/SciViews-K/.DS_Store
   komodo/SciViews-K/.komodotools/Build.komodotool
   komodo/SciViews-K/.komodotools/Build_and_Install.komodotool
   komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool
   komodo/SciViews-K/SciViews-K.komodoproject
   komodo/SciViews-K/chrome.manifest
   komodo/SciViews-K/content/.DS_Store
   komodo/SciViews-K/content/RHelpWindow.xul
   komodo/SciViews-K/content/js/commands.js
   komodo/SciViews-K/content/js/rconsole.js
   komodo/SciViews-K/content/js/robjects.js
   komodo/SciViews-K/content/js/sciviews.js
   komodo/SciViews-K/content/overlayMain.xul
   komodo/SciViews-K/defaults/svStart.R
   komodo/SciViews-K/install.rdf
   komodo/SciViews-K/skin/.DS_Store
   komodo/SciViews-K/skin/icons/misc/.DS_Store
   komodo/SciViews-K/skin/images/.DS_Store
Log:
SciViews-K compatible with Komodo 9

Modified: komodo/.DS_Store
===================================================================
(Binary files differ)

Modified: komodo/SciViews-K/.DS_Store
===================================================================
(Binary files differ)

Modified: komodo/SciViews-K/.komodotools/Build.komodotool
===================================================================
--- komodo/SciViews-K/.komodotools/Build.komodotool	2014-10-03 11:46:42 UTC (rev 554)
+++ komodo/SciViews-K/.komodotools/Build.komodotool	2015-02-05 12:36:34 UTC (rev 555)
@@ -11,7 +11,7 @@
     "var project = ko.macros.current.project;", 
     "var projectDir = ko.interpolate.interpolateString('%p');", 
     "var callback = function() {", 
-    "  ko.statusBar.AddMessage('Build complete', 'projects', 5000, true);", 
+    "  require(\"notify/notify\").send(\"Build complete\", \"projects\");", 
     "  ko.projects.manager.saveProject(project);", 
     "};", 
     "var osPath = Components.classes[\"@activestate.com/koOsPath;1\"].", 
@@ -27,7 +27,7 @@
     "                                   callback);", 
     "}"
   ], 
-  "trigger": "", 
+  "trigger": "trigger_postopen", 
   "rank": 100, 
   "version": "1.0.12", 
   "async": 1, 

Modified: komodo/SciViews-K/.komodotools/Build_and_Install.komodotool
===================================================================
--- komodo/SciViews-K/.komodotools/Build_and_Install.komodotool	2014-10-03 11:46:42 UTC (rev 554)
+++ komodo/SciViews-K/.komodotools/Build_and_Install.komodotool	2015-02-05 12:36:34 UTC (rev 555)
@@ -12,7 +12,7 @@
     "var project = ko.macros.current.project;", 
     "var projectDir = ko.interpolate.interpolateString('%p');", 
     "var callback = function() {", 
-    "  ko.statusBar.AddMessage('Build complete', 'projects', 5000, true);", 
+    "  require(\"notify/notify\").send(\"Build complete\", \"projects\");", 
     "  ko.projects.manager.saveProject(project);", 
     "  var os = Components.classes[\"@activestate.com/koOs;1\"].", 
     "                  getService(Components.interfaces.koIOs);", 
@@ -45,7 +45,7 @@
     "                                   callback);", 
     "}"
   ], 
-  "trigger": "", 
+  "trigger": "trigger_postopen", 
   "rank": 100, 
   "version": "1.0.12", 
   "async": 1, 

Modified: komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool
===================================================================
--- komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool	2014-10-03 11:46:42 UTC (rev 554)
+++ komodo/SciViews-K/.komodotools/Docs_-_Extensions.komodotool	2015-02-05 12:36:34 UTC (rev 555)
@@ -6,7 +6,7 @@
   "value": [
     "ko.help.open('komodo_extensions');"
   ], 
-  "trigger": "", 
+  "trigger": "trigger_postopen", 
   "rank": 100, 
   "version": "1.0.12", 
   "async": 1, 

Modified: komodo/SciViews-K/SciViews-K.komodoproject
===================================================================
--- komodo/SciViews-K/SciViews-K.komodoproject	2014-10-03 11:46:42 UTC (rev 554)
+++ komodo/SciViews-K/SciViews-K.komodoproject	2015-02-05 12:36:34 UTC (rev 555)
@@ -57,6 +57,7 @@
   <boolean id="perl_lintOption_disableBeginBlocks">1</boolean>
   <boolean id="perl_lintOption_includeCurrentDirForLinter">1</boolean>
   <string id="perl_lintOption_perlCriticLevel">off</string>
+  <long id="prefs_version">1</long>
   <string id="pychecker3_checking_rcfile"></string>
   <string id="pychecker3_wrapper_location"></string>
   <string id="pychecker_checking_rcfile"></string>

Modified: komodo/SciViews-K/chrome.manifest
===================================================================
--- komodo/SciViews-K/chrome.manifest	2014-10-03 11:46:42 UTC (rev 554)
+++ komodo/SciViews-K/chrome.manifest	2015-02-05 12:36:34 UTC (rev 555)
@@ -1,5 +1,18 @@
+
+
+
+
+
+
+
+
 content sciviewsk jar:sciviewsk.jar!/content/
+skin    sciviewsk  classic/1.0  jar:sciviewsk.jar!/skin/
+locale  sciviewsk     en-US     jar:sciviewsk.jar!/locale/en-US/
+locale  sciviewsk     en-GB     jar:sciviewsk.jar!/locale/en-GB/
+locale  sciviewsk     fr-FR     jar:sciviewsk.jar!/locale/fr-FR/
 
+
 overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/overlayMain.xul appversion>6.99
 overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/overlayMain-ko6.xul appversion<=6.99
 overlay chrome://komodo/content/pref/pref.xul chrome://sciviewsk/content/prefOverlay.xul
@@ -7,10 +20,4 @@
 overlay chrome://komodo/content/komodo.xul chrome://sciviewsk/content/RObjectsOverlay.xul appversion<=6.99
 overlay chrome://places/content/places_panel.xul chrome://sciviewsk/content/placesOverlay.xul appversion>6.99
 
-locale  sciviewsk     en-US     jar:sciviewsk.jar!/locale/en-US/
-locale  sciviewsk     en-GB     jar:sciviewsk.jar!/locale/en-GB/
-locale  sciviewsk     fr-FR     jar:sciviewsk.jar!/locale/fr-FR/
-
-skin    sciviewsk  classic/1.0  jar:sciviewsk.jar!/skin/
-
 manifest components/component.manifest

Modified: komodo/SciViews-K/content/.DS_Store
===================================================================
(Binary files differ)

Modified: komodo/SciViews-K/content/RHelpWindow.xul
===================================================================
--- komodo/SciViews-K/content/RHelpWindow.xul	2014-10-03 11:46:42 UTC (rev 554)
+++ komodo/SciViews-K/content/RHelpWindow.xul	2015-02-05 12:36:34 UTC (rev 555)
@@ -311,7 +311,8 @@
 				// Make sure that help is started, but do not open a browser
 				cmd = 'invisible(capture.output(suppressMessages(help.start(browser = function(...) return())))); ';
 				// Return the home page of R >= 2.10 help system
-				cmd += 'cat(paste("\n", "http://127.0.0.1:", tools:::httpdPort, "/doc/html/index.html", sep = ""))';
+				// TODO: Starting from R 3.2.0 only use tools::startDynamicHelp(NA) here!
+				cmd += 'cat(paste("\n", "http://127.0.0.1:", if (is.function(tools:::httpdPort)) tools::startDynamicHelp(NA) else tools::httpdPort, "/doc/html/index.html", sep = ""))';
 		
 				res = sv.r.evalCallback(cmd, function (path) {
 					path = sv.tools.strings.removeLastCRLF(path);

Modified: komodo/SciViews-K/content/js/commands.js
===================================================================
--- komodo/SciViews-K/content/js/commands.js	2014-10-03 11:46:42 UTC (rev 554)
+++ komodo/SciViews-K/content/js/commands.js	2015-02-05 12:36:34 UTC (rev 555)
@@ -195,11 +195,13 @@
 			isWin? "r-gui" : "r-terminal");
 
 		// Width of R output defined to fit R output panel (min = 66, max = 200)
-		var rcons = document.getElementById("rconsole-scintilla2");
+		//var rcons = document.getElementById("rconsole-scintilla2");
 		// In ko7, we need a different code!
-		if (rcons == null) rcons = document
-			.getElementById("sciviews_rconsole_tab")
-			.contentDocument.getElementById("rconsole-scintilla2");	
+		//if (rcons == null) rcons = document
+		//	.getElementById("sciviews_rconsole_tab")
+		//	.contentDocument.getElementById("rconsole-scintilla2");	
+		var rcons = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-scintilla2");
 		var scimoz = rcons.scimoz;
 		var width = (Math.floor(window.innerWidth /
 			scimoz.textWidth(0, "0")) - 7)
@@ -398,7 +400,7 @@
 				// try/catch here somehow prevented from storing window
 				// reference in RHelpWin. No idea why...
 				RHelpWin = window.openDialog(rHelpXulUri, "RHelp",
-					"chrome=yes,dependent,resizable=yes," +
+					"chrome=yes,resizable=yes," +
 					"scrollbars=yes,status=no,close,dialog=no", sv, uri);
 			} else {
 				// It seems we could enter in a deadlock situation here

Modified: komodo/SciViews-K/content/js/rconsole.js
===================================================================
--- komodo/SciViews-K/content/js/rconsole.js	2014-10-03 11:46:42 UTC (rev 554)
+++ komodo/SciViews-K/content/js/rconsole.js	2015-02-05 12:36:34 UTC (rev 555)
@@ -91,12 +91,14 @@
     var _gRProcess = null;
     
     function _ClearUI () {
-        var descWidget = document.getElementById("rconsole-desc");
+        //var descWidget = document.getElementById("rconsole-desc");
         // In ko7, we need a different code!
-        if (descWidget == null) descWidget = document
-            .getElementById("sciviews_rconsole_tab")
-            .contentDocument.getElementById("rconsole-desc");
-        descWidget.style.setProperty("color", "black", "");
+        //if (descWidget == null) descWidget = document
+        //    .getElementById("sciviews_rconsole_tab")
+        //    .contentDocument.getElementById("rconsole-desc");
+        var descWidget = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-desc");
+		descWidget.style.setProperty("color", "black", "");
         descWidget.removeAttribute("value");
         descWidget.removeAttribute("_command");
     }
@@ -116,11 +118,13 @@
             _ClearUI();
     
             // TODO: shouldn't we eliminate this???
-            var treeWidget = document.getElementById("rconsole-tree");
+            //var treeWidget = document.getElementById("rconsole-tree");
             // In ko7, we need a different code!
-            if (treeWidget == null) treeWidget = document
-            	.getElementById("sciviews_rconsole_tab")
-            	.contentDocument.getElementById("rconsole-tree");
+            //if (treeWidget == null) treeWidget = document
+            //	.getElementById("sciviews_rconsole_tab")
+            //	.contentDocument.getElementById("rconsole-tree");
+			var treeWidget = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-tree");
             var boxObject = treeWidget.treeBoxObject
                 .QueryInterface(Components.interfaces.nsITreeBoxObject);
         
@@ -129,11 +133,13 @@
                 // visible before we can assign the view to it
                 RConsole_Show(window);
             }
-            _gRTerminalView = (document.getElementById("rconsole-scintilla") == null) ?
-                document.getElementById("sciviews_rconsole_tab")
-                    .contentDocument.getElementById("rconsole-scintilla") :
-                document.getElementById("rconsole-scintilla");
-            _gRTerminalView.init();
+            //_gRTerminalView = (document.getElementById("rconsole-scintilla") == null) ?
+            //    document.getElementById("sciviews_rconsole_tab")
+            //        .contentDocument.getElementById("rconsole-scintilla") :
+            //    document.getElementById("rconsole-scintilla");
+            _gRTerminalView = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-scintilla");
+			_gRTerminalView.init();
             _gRTerminalView.initWithTerminal(_gRTerminalHandler);
             boxObject.view = _gRTerminalHandler;
     
@@ -141,11 +147,13 @@
             //["mousedown", "focus"].forEach(function(eventname) {
             //        window.frameElement.addEventListener(eventname, function(event) {
             //        if (event.originalTarget == event.target) {
-            //          var deck = document.getElementById("rconsole-deck");
+            //          //var deck = document.getElementById("rconsole-deck");
             //          // In ko7, we need a different code!
-            //          if (deck == null) deck = document
-            //          	.getElementById("sciviews_rconsole_tab")
-            //          	.contentDocument.getElementById("rconsole-deck");	
+            //          //if (deck == null) deck = document
+            //          //	.getElementById("sciviews_rconsole_tab")
+            //          //	.contentDocument.getElementById("rconsole-deck");
+			//			var deck = ko.widgets.getWidget("sciviews_rconsole_tab")
+			//				.contentDocument.getElementById("rconsole-deck");
             //          deck.focus();
             //        }
             //    }, false);
@@ -157,20 +165,24 @@
             // by appending the prompt to it
             sv.cmdout.append(":> ", false);
             // Observe keypress event on the R Console panel
-            var rcons = document.getElementById("rconsole-scintilla");
+            //var rcons = document.getElementById("rconsole-scintilla");
             // In ko7, we need a different code!
-            if (rcons == null) rcons = document
-            	.getElementById("sciviews_rconsole_tab")
-            	.contentDocument.getElementById("rconsole-scintilla");	
-            rcons.addEventListener('keypress', sv.rconsole.rconsoleOnKeyPress,
+            //if (rcons == null) rcons = document
+            //	.getElementById("sciviews_rconsole_tab")
+            //	.contentDocument.getElementById("rconsole-scintilla");	
+            var rcons = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-scintilla");
+			rcons.addEventListener('keypress', sv.rconsole.rconsoleOnKeyPress,
                 true);            
             // And observe keypress events on the R Output panel
-            var rcons2 = document.getElementById("rconsole-scintilla2");
+            //var rcons2 = document.getElementById("rconsole-scintilla2");
             // In ko7, we need a different code!
-            if (rcons2 == null) rcons2 = document
-                .getElementById("sciviews_rconsole_tab")
-                .contentDocument.getElementById("rconsole-scintilla2");	
-            rcons2.addEventListener('keypress', sv.rconsole.routputOnKeyPress,
+            //if (rcons2 == null) rcons2 = document
+            //    .getElementById("sciviews_rconsole_tab")
+            //    .contentDocument.getElementById("rconsole-scintilla2");	
+            var rcons2 = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-scintilla2");
+			rcons2.addEventListener('keypress', sv.rconsole.routputOnKeyPress,
                 true);
         } finally {
             ko.main.addWillCloseHandler(sv.rconsole.finalize);
@@ -223,12 +235,14 @@
         _ClearUI();
         
         // Clear the console and make sure work wrap is none
-        var terminalView = document.getElementById("rconsole-scintilla");
+        //var terminalView = document.getElementById("rconsole-scintilla");
         // In ko7, we need a different code!
-        if (terminalView == null) terminalView = document
-            .getElementById("sciviews_rconsole_tab")
-            .contentDocument.getElementById("rconsole-scintilla");
-        //var scimoz = terminalView.scimoz;
+        //if (terminalView == null) terminalView = document
+        //    .getElementById("sciviews_rconsole_tab")
+        //    .contentDocument.getElementById("rconsole-scintilla");
+        var terminalView = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-scintilla");
+		//var scimoz = terminalView.scimoz;
         // Note the width of the R console in characters is approximately
         //Math.floor(window.innerWidth / scimoz.textWidth(0, "0")) - 7
         // => set this option in R everytime the Komodo window size changes!
@@ -244,22 +258,26 @@
         _gRTerminalHandler.setCwd(cwd);
         terminalView.cwd = cwd;
     
-        var descWidget = document.getElementById("rconsole-desc");
+        //var descWidget = document.getElementById("rconsole-desc");
         // In ko7, we need a different code!
-        if (descWidget == null) descWidget = document
-            .getElementById("sciviews_rconsole_tab")
-            .contentDocument.getElementById("rconsole-desc");
-        descWidget.setAttribute("value", "R is running (" + command + ")");
+        //if (descWidget == null) descWidget = document
+        //    .getElementById("sciviews_rconsole_tab")
+        //    .contentDocument.getElementById("rconsole-desc");
+        var descWidget = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-desc");
+		descWidget.setAttribute("value", "R is running (" + command + ")");
         // Store the command name for later use
         descWidget.setAttribute("_command", command);
     
         if (clearContent) {
-            var listButton = document.getElementById("rconsole-list-button");
+            //var listButton = document.getElementById("rconsole-list-button");
             // In ko7, we need a different code!
-            if (listButton == null) listButton = document
-                .getElementById("sciviews_rconsole_tab")
-                .contentDocument.getElementById("rconsole-list-button");
-            listButton.setAttribute("disabled", "true");
+            //if (listButton == null) listButton = document
+            //    .getElementById("sciviews_rconsole_tab")
+            //    .contentDocument.getElementById("rconsole-list-button");
+            var listButton = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-list-button");
+			listButton.setAttribute("disabled", "true");
             _gRTerminalView.clear();
         }
     }
@@ -269,12 +287,14 @@
         //dump("XXX RConsole_EndSession(retval="+retval+")\n");
         _gRTerminalView.endSession();
     
-        var descWidget = document.getElementById("rconsole-desc");
+        //var descWidget = document.getElementById("rconsole-desc");
         // In ko7, we need a different code!
-        if (descWidget == null) descWidget = document
-            .getElementById("sciviews_rconsole_tab")
-            .contentDocument.getElementById("rconsole-desc");
-        var command = descWidget.getAttribute("_command");
+        //if (descWidget == null) descWidget = document
+        //    .getElementById("sciviews_rconsole_tab")
+        //    .contentDocument.getElementById("rconsole-desc");
+        var descWidget = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-desc");
+		var command = descWidget.getAttribute("_command");
         var msg = null;
         var osSvc = Components.classes["@activestate.com/koOs;1"]
             .getService(Components.interfaces.koIOs);
@@ -289,12 +309,14 @@
         descWidget.setAttribute("value", msg);
     
         _gRProcess = null;
-        var closeButton = document.getElementById("rconsole-close-button");
+        //var closeButton = document.getElementById("rconsole-close-button");
         // In ko7, we need a different code!
-        if (closeButton == null) closeButton = document
-            .getElementById("sciviews_rconsole_tab")
-            .contentDocument.getElementById("rconsole-close-button");
-        closeButton.setAttribute("disabled", "true");
+        //if (closeButton == null) closeButton = document
+        //    .getElementById("sciviews_rconsole_tab")
+        //    .contentDocument.getElementById("rconsole-close-button");
+        var closeButton = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-close-button");
+		closeButton.setAttribute("disabled", "true");
     }
     
     // koIRunTerminationListener implementation whose only job is to call
@@ -441,11 +463,13 @@
     this.setProcessHandle = function RConsole_SetProcessHandle (process) {
         if (_gRTerminalHandler.active) {
             _gRProcess = process;
-            var closeButton = document.getElementById("rconsole-close-button");
+            //var closeButton = document.getElementById("rconsole-close-button");
             // In ko7, we need a different code!
-            if (closeButton == null) closeButton = document
-                .getElementById("sciviews_rconsole_tab")
-                .contentDocument.getElementById("rconsole-close-button");
+            //if (closeButton == null) closeButton = document
+            //    .getElementById("sciviews_rconsole_tab")
+            //    .contentDocument.getElementById("rconsole-close-button");
+			var closeButton = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-close-button");
             closeButton.removeAttribute("disabled");
         }
     }
@@ -457,22 +481,26 @@
     
     function _SetView (editor, deck) {
         // Ignore editor, always use the window we're in
-        var deckWidget = document.getElementById("rconsole-deck");
+        //var deckWidget = document.getElementById("rconsole-deck");
         // In ko7, we need a different code!
-        if (deckWidget == null) deckWidget = document
-            .getElementById("sciviews_rconsole_tab")
-            .contentDocument.getElementById("rconsole-deck");
-        deckWidget.setAttribute("selectedIndex", deck);
+        //if (deckWidget == null) deckWidget = document
+        //    .getElementById("sciviews_rconsole_tab")
+        //    .contentDocument.getElementById("rconsole-deck");
+        var deckWidget = ko.widgets.getWidget("sciviews_rconsole_tab")
+			.contentDocument.getElementById("rconsole-deck");
+		deckWidget.setAttribute("selectedIndex", deck);
     }
     
     this.toggleView = function RConsole_ToggleView (newview) {
         if (typeof newview == 'undefined' || newview == null) {
-            var deckWidget = document.getElementById("rconsole-deck");
+            //var deckWidget = document.getElementById("rconsole-deck");
             // In ko7, we need a different code!
-            if (deckWidget == null) deckWidget = document
-                .getElementById("sciviews_rconsole_tab")
-                .contentDocument.getElementById("rconsole-deck");
-            if (deckWidget.getAttribute("selectedIndex") == 1) {
+            //if (deckWidget == null) deckWidget = document
+            //    .getElementById("sciviews_rconsole_tab")
+            //    .contentDocument.getElementById("rconsole-deck");
+            var deckWidget = ko.widgets.getWidget("sciviews_rconsole_tab")
+				.contentDocument.getElementById("rconsole-deck");
+			if (deckWidget.getAttribute("selectedIndex") == 1) {
                 newview = 0;
             } else {
                 newview = 1;
@@ -488,11 +516,13 @@
         
     this.onFocus = function RConsole_OnFocus(event) {
         if (event.originalTarget != window) return;
-        var deckWidget = document.getElementById("rconsole-deck");
+        //var deckWidget = document.getElementById("rconsole-deck");
         // In ko7, we need a different code!
-        if (deckWidget == null) deckWidget = document
-            .getElementById("sciviews_rconsole_tab")
-            .contentDocument.getElementById("rconsole-deck");
+        //if (deckWidget == null) deckWidget = document
+        //    .getElementById("sciviews_rconsole_tab")
+        //    .contentDocument.getElementById("rconsole-deck");
+		var deckWidget = ko.widgets.getWidget("sciviews_rconsole_tab")
+			.contentDocument.getElementById("rconsole-deck");
         var selected = deckWidget.selectedPanel;
         if ("scintilla" in selected) {
             selected.scintilla.focus();
@@ -508,9 +538,9 @@
     this.rconsoleOnKeyPress = function (event) {
         try {
         	// TODO: implement the function that erase the command
-            if (event.keyCode == 13) {
-                // TODO: what am I supposed to do here???
-            }
+        //    if (event.keyCode == 13) {
+        //        // TODO: what am I supposed to do here???
+        //    }
             
             // This does not work because another event is dealing with this
             // case differently

Modified: komodo/SciViews-K/content/js/robjects.js
===================================================================
--- komodo/SciViews-K/content/js/robjects.js	2014-10-03 11:46:42 UTC (rev 554)
+++ komodo/SciViews-K/content/js/robjects.js	2015-02-05 12:36:34 UTC (rev 555)
@@ -322,10 +322,13 @@
 	
 		isInitialized = true;
 		if (init) {
-			var tree = document.getElementById("sciviews_robjects_objects_tree");
+			//var tree = document.getElementById("sciviews_robjects_objects_tree");
 			// In ko7, we need a different code!
-			if (tree == null) tree = document	
-				.getElementById("sciviews_robjects_tab").contentDocument
+			//if (tree == null) tree = document	
+			//	.getElementById("sciviews_robjects_tab").contentDocument
+			//	.getElementById("sciviews_robjects_objects_tree");
+			var tree = ko.widgets.getWidget("sciviews_robjects_tab")
+				.contentDocument
 				.getElementById("sciviews_robjects_objects_tree");
 			tree.view = this;
 		}
@@ -358,11 +361,13 @@
 
 	// Allow for filtering by exclusion: prepend with "!"
 	function _getFilter () {
-		var tb = document.getElementById("sciviews_robjects_filterbox");
+		//var tb = document.getElementById("sciviews_robjects_filterbox");
 		// In ko7, we need a different code!
-		if (tb == null) tb = document	
-			.getElementById("sciviews_robjects_tab").contentDocument
-			.getElementById("sciviews_robjects_filterbox");
+		//if (tb == null) tb = document	
+		//	.getElementById("sciviews_robjects_tab").contentDocument
+		//	.getElementById("sciviews_robjects_filterbox");
+		var tb = ko.widgets.getWidget("sciviews_robjects_tab")
+			.contentDocument.getElementById("sciviews_robjects_filterbox");
 		var obRx, text, not;
 		text = tb.value;
 		not = (text.substring(0, 1) == "!")
@@ -512,11 +517,13 @@
 	this.sort =  function (column, root) {
 		var columnName, currentElement, tree, sortDirection, realOrder, order,
 			sortDirs;
-		tree = document.getElementById("sciviews_robjects_objects_tree");
+		//tree = document.getElementById("sciviews_robjects_objects_tree");
 		// In ko7, we need a different code!
-		if (tree == null) tree = document	
-			.getElementById("sciviews_robjects_tab").contentDocument
-			.getElementById("sciviews_robjects_objects_tree");
+		//if (tree == null) tree = document	
+		//	.getElementById("sciviews_robjects_tab").contentDocument
+		//	.getElementById("sciviews_robjects_objects_tree");
+		tree = ko.widgets.getWidget("sciviews_robjects_tab")
+			.contentDocument.getElementById("sciviews_robjects_objects_tree");
 		sortDirection = tree.getAttribute("sortDirection");
 		sortDirs = ["descending", "natural", "ascending", "descending"];
 		realOrder = sortDirs.indexOf(sortDirection) - 1;
@@ -592,11 +599,13 @@
 		var cols = tree.getElementsByTagName("treecol");
 		for (var i = 0; i < cols.length; i++)
 			cols[i].removeAttribute("sortDirection");
-		var columnWidget = document.getElementById(columnName);
+		//var columnWidget = document.getElementById(columnName);
 		// In ko7, we need a different code!
-		if (columnWidget == null) columnWidget = document	
-			.getElementById("sciviews_robjects_tab").contentDocument
-			.getElementById(columnName);
+		//if (columnWidget == null) columnWidget = document	
+		//	.getElementById("sciviews_robjects_tab").contentDocument
+		//	.getElementById(columnName);
+		var columnWidget = ko.widgets.getWidget("sciviews_robjects_tab")
+				.contentDocument.getElementById(columnName);
 		columnWidget.setAttribute("sortDirection", sortDirection);
 
 		if (!root || root == _this.treeData) {
@@ -856,11 +865,14 @@
 			pos = _this.searchPath.indexOf(path);
 			if (pos == -1) return(false);
 
-			var listWidget = document
-				.getElementById("sciviews_robjects_searchpath_listbox");
+			//var listWidget = document
+			//	.getElementById("sciviews_robjects_searchpath_listbox");
 			// In ko7, we need a different code!
-			if (listWidget == null) listWidget = document	
-				.getElementById("sciviews_robjects_tab").contentDocument
+			//if (listWidget == null) listWidget = document	
+			//	.getElementById("sciviews_robjects_tab").contentDocument
+			//	.getElementById("sciviews_robjects_searchpath_listbox");
+			var listWidget = ko.widgets.getWidget("sciviews_robjects_tab")
+				.contentDocument
 				.getElementById("sciviews_robjects_searchpath_listbox");
 			listWidget.getItemAtIndex(pos).checked = true;
 			_addObject(path, "", _parseObjectList, path);
@@ -893,11 +905,13 @@
 	//
 	//	isInitialized = true;
 	//
-	// var objTree = document.getElementById("sciviews_robjects_objects_tree");
-	// In ko7, we need a different code!
-	//if (objTree == null) objTree = document	
-	//	.getElementById("sciviews_robjects_tab").contentDocument
-	//	.getElementById("sciviews_robjects_objects_tree");
+	//// var objTree = document.getElementById("sciviews_robjects_objects_tree");
+	//// In ko7, we need a different code!
+	////if (objTree == null) objTree = document	
+	////	.getElementById("sciviews_robjects_tab").contentDocument
+	////	.getElementById("sciviews_robjects_objects_tree");
+	//var objTree = ko.widgets.getWidget("sciviews_robjects_tab")
+	//		.contentDocument.getElementById("sciviews_robjects_objects_tree");
 	//objTree.view = this;
 	//	this.treeBox.scrollToRow(0);
 	//};
@@ -918,11 +932,14 @@
 	// Display the list of packages in the search path
 	this.displayPackageList = function () {
 		var pack;
-		var node = document
-			.getElementById("sciviews_robjects_searchpath_listbox");
+		//var node = document
+		//	.getElementById("sciviews_robjects_searchpath_listbox");
 		// In ko7, we need a different code!
-		if (node == null) node = document	
-			.getElementById("sciviews_robjects_tab").contentDocument
+		//if (node == null) node = document	
+		//	.getElementById("sciviews_robjects_tab").contentDocument
+		//	.getElementById("sciviews_robjects_searchpath_listbox");
+		var node = ko.widgets.getWidget("sciviews_robjects_tab")
+			.contentDocument
 			.getElementById("sciviews_robjects_searchpath_listbox");
 				
 		var selectedLabel = node.selectedItem ?
@@ -966,18 +983,22 @@
 		var what = event.target.tagName;
 		var broadcaster = document
 			.getElementById("cmd_robjects_viewSearchPath");
-		var box = document.getElementById(broadcaster.getAttribute("box"));
+		//var box = document.getElementById(broadcaster.getAttribute("box"));
 		// In ko7, we need a different code!
-		if (box == null) box = document	
-			.getElementById("sciviews_robjects_tab").contentDocument
-			.getElementById(broadcaster.getAttribute("box"));
+		//if (box == null) box = document	
+		//	.getElementById("sciviews_robjects_tab").contentDocument
+		//	.getElementById(broadcaster.getAttribute("box"));
+		var box = ko.widgets.getWidget("sciviews_robjects_tab")
+			.contentDocument.getElementById(broadcaster.getAttribute("box"));
 
 		if (what == "splitter" || what == "grippy") {
-			var splitter = document.getElementById("sciviews_robjects_splitter");
+			//var splitter = document.getElementById("sciviews_robjects_splitter");
 			// In ko7, we need a different code!
-			if (splitter == null) splitter = document	
-				.getElementById("sciviews_robjects_tab").contentDocument
-				.getElementById("sciviews_robjects_splitter");
+			//if (splitter == null) splitter = document	
+			//	.getElementById("sciviews_robjects_tab").contentDocument
+			//	.getElementById("sciviews_robjects_splitter");
+			var splitter = ko.widgets.getWidget("sciviews_robjects_tab")
+				.contentDocument.getElementById("sciviews_robjects_splitter");
 			var state = splitter.getAttribute("state");
 			broadcaster.setAttribute("checked", state != "collapsed");
 		} else {
@@ -1201,11 +1222,13 @@
 			menuItem.setAttribute("checked", true);
 		}
 
-		var filterBox = document.getElementById("sciviews_robjects_filterbox");
+		//var filterBox = document.getElementById("sciviews_robjects_filterbox");
 		// In ko7, we need a different code!
-		if (filterBox == null) filterBox = document
-			.getElementById("sciviews_robjects_tab").contentDocument
-			.getElementById("sciviews_robjects_filterbox");
+		//if (filterBox == null) filterBox = document
+		//	.getElementById("sciviews_robjects_tab").contentDocument
+		//	.getElementById("sciviews_robjects_filterbox");
+		var filterBox = ko.widgets.getWidget("sciviews_robjects_tab")
+			.contentDocument.getElementById("sciviews_robjects_filterbox");
 		filterBox.emptyText = menuItem.getAttribute("label") + "...";
 		filterBox.focus();
 
@@ -1243,11 +1266,13 @@
 		// Help can be shown only for one object:
 		var noHelp = !isPackage || !isInPackage;
 
-		//var menuNode = document.getElementById("rObjectsContext");
+		////var menuNode = document.getElementById("rObjectsContext");
 		//// In ko7, we need a different code!
-		//if (menuNode == null) menuNode = document
-		//	.getElementById("sciviews_robjects_tab").contentDocument
-		//	.getElementById("rObjectsContext");
+		////if (menuNode == null) menuNode = document
+		////	.getElementById("sciviews_robjects_tab").contentDocument
+		////	.getElementById("rObjectsContext");
+		//var menuNode = ko.widgets.getWidget("sciviews_robjects_tab")
+		//	.contentDocument.getElementById("rObjectsContext");
 		var menuItems = event.target.childNodes;
 		var testDisableIf, disable = false;
 
@@ -1463,11 +1488,13 @@
 			 
 			 case 93:
 				// Windows context menu key
-				var contextMenu = document.getElementById("rObjectsContext");
+				//var contextMenu = document.getElementById("rObjectsContext");
 				// In ko7, we need a different code!
-				if (contextMenu == null) contextMenu = document
-					.getElementById("sciviews_robjects_tab").contentDocument
-					.getElementById("rObjectsContext");
+				//if (contextMenu == null) contextMenu = document
+				//	.getElementById("sciviews_robjects_tab").contentDocument
+				//	.getElementById("rObjectsContext");
+				var contextMenu = ko.widgets.getWidget("sciviews_robjects_tab")
+					.contentDocument.getElementById("rObjectsContext");
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/sciviews -r 555


More information about the Sciviews-commits mailing list