src/eric7/Debugger/VariablesViewer.py

branch
eric7
changeset 9397
a415cb83dafb
parent 9221
bf71ee032bb4
child 9413
80c06d472826
--- a/src/eric7/Debugger/VariablesViewer.py	Mon Oct 10 09:25:29 2022 +0200
+++ b/src/eric7/Debugger/VariablesViewer.py	Tue Oct 11 13:01:02 2022 +0200
@@ -275,11 +275,14 @@
         Public method to update the data model of variable in pathlist.
 
         @param vlist the list of variables to be displayed. Each
-                list entry is a tuple of three values.
+                list entry is a tuple of six values.
                 <ul>
-                <li>the variable name (string)</li>
-                <li>the variables type (string)</li>
-                <li>the variables value (string)</li>
+                <li>the variable name (str)</li>
+                <li>list, tuple, dict or set indicator (str)</li>
+                <li>the variables type (str)</li>
+                <li>a flag indicating the presence of children (bool)</li>
+                <li>the length of the array or string (int)</li>
+                <li>the variables value (str)</li>
                 </ul>
         @type list of str
         @param frmnr frame number (0 is the current frame)
@@ -732,7 +735,7 @@
         )
         ericApp().getObject("DebugServer").remoteClientVariable(
             ericApp().getObject("DebugUI").getSelectedDebuggerId(),
-            self.__globalScope,
+            1 if self.__globalScope else 0,
             variablesFilter,
             pathlist,
             self.framenr,
@@ -942,11 +945,14 @@
         Public method to show variables in a list.
 
         @param vlist the list of variables to be displayed. Each
-                list entry is a tuple of three values.
+                list entry is a tuple of six values.
                 <ul>
-                <li>the variable name (string)</li>
-                <li>the variables type (string)</li>
-                <li>the variables value (string)</li>
+                <li>the variable name (str)</li>
+                <li>list, tuple, dict or set indicator (str)</li>
+                <li>the variables type (str)</li>
+                <li>a flag indicating the presence of children (bool)</li>
+                <li>the length of the array or string (int)</li>
+                <li>the variables value (str)</li>
                 </ul>
         @type list
         @param frmnr frame number (0 is the current frame)
@@ -962,11 +968,14 @@
         @param vlist the list of subitems to be displayed.
                 The first element gives the path of the
                 parent variable. Each other list entry is
-                a tuple of three values.
+                a tuple of six values.
                 <ul>
-                <li>the variable name (string)</li>
-                <li>the variables type (string)</li>
-                <li>the variables value (string)</li>
+                <li>the variable name (str)</li>
+                <li>list, tuple, dict or set indicator (str)</li>
+                <li>the variables type (str)</li>
+                <li>a flag indicating the presence of children (bool)</li>
+                <li>the length of the array or string (int)</li>
+                <li>the variables value (str)</li>
                 </ul>
         @type list
         """
@@ -1159,6 +1168,12 @@
         """
         ericApp().getObject("DebugUI").dbgFilterAct.triggered.emit()
 
+    def clear(self):
+        """
+        Public method to clear the viewer.
+        """
+        self.varModel.clear()
+
 
 #
 # eflag: noqa = M822

eric ide

mercurial