I've encountered an issue where nested tables of MU instances inherit their contents "backwards" to their class object. Please see the attached model file.
Toggle comments on line 9 in the method to test cutting/not cutting inheritance.
Some issues summarized:
This only seems to happen with nested tables. Other data types seem to work as expected.
Are these bugs? Perhaps I'm not following on some basics
Solved! Go to Solution.
The problem is that when you access @.ClassTable[1,1] you get the sub table of the the original table since the content is inherited.
When you now assign a value to a cell in this sub table the system no longer knows that you got this sub table through an instance.
This is also the reason why @.ClassTable[1,1].openDialog doesn't seem to have an affect after you called .MUs.Part.ClassTable[1,1].openDialog. It just does nothing since it's the same table which is already open.
So the only solution is what you did, turning off the inheritance manually.
Thank you very much, this problem made me dizzy after a while! I wonder - if these nested tables have content inheritance by default, why is the option to cut inheritance of this nested table not available to us in the GUI? Perhaps I haven't found it but the button in the Lists group is grayed out (by the way - clicking it very fast enables the user to bypass the grayed out functionality.. See the attached video)
My expected result of the code was getting the sub table of the instance, and once I write a value to it the inheritance to the sub table instance is broken, since this is how most (if not all) objects I've worked with behave. But sub tables seem to be an exception to this with no clear way to cut inheritance or show that the sub table is inherited via the GUI? The inheritance must be cut via code?
It works a little different. The nested list in this case doesn't have content inheritance switched on. In fact you get the nested list of the origin.
As you wrote the only way to handle this is too turn off inheritance via code.
We have to investigate why you can bypass the grayed out functionality. Perhaps the UI is not updated fast enough.