Xcos MVC: read-only undocumented 'modelID' field 82/16182/2
Clément DAVID [Mon, 2 Mar 2015 09:19:23 +0000 (10:19 +0100)]
This field can be used while debugging and in cooperation with scicos_log("TRACE").

Change-Id: I9a47b4a971818e29883907517d36eff3e9b8d687

scilab/modules/scicos/src/cpp/view_scilab/BaseAdapter.hxx

index 5c387de..4ddbd79 100644 (file)
@@ -315,6 +315,14 @@ private:
             out = value;
             return true;
         }
+
+        // specific case : to ease debugging let the user retrieve the model ID
+        if (name == L"modelID")
+        {
+            out = new types::Double(m_adaptee->id());
+            return true;
+        }
+
         return false;
     }