NISystemsEngineering / CEF

A starting point for creating a custom configuration editor in the LabVIEW Development Environment.
https://decibel.ni.com/content/docs/DOC-37225
Other
14 stars 5 forks source link

CEF Hierarchical demo not saving when close Front Panel #110

Open cjalanis opened 5 years ago

cjalanis commented 5 years ago

When you run the Hierarchical Configuration Editor example, and you select Save or Save As... the XML generated has JSON content is saved as expected:

1.0.0
{"hierarchy structure":{"root":"5221C8D8-2C15-492C-BEA6-26A4714B1CDE","hierarchy":[{"current node":"5221C8D8-2C15-492C-BEA6-26A4714B1CDE","children":[]}]},"instance data":[{"ID":"5221C8D8-2C15-492C-BEA6-26A4714B1CDE","Alias":"cRIO configuration","class":"cRIO configuration.lvclass","version":"1.0.0","data":"<instanceID>5221C8D8-2C15-492C-BEA6-26A4714B1CDE</instanceID>\r\n<kvpairs>\r\n<SCFG_AliasName>cRIO configuration</SCFG_AliasName>\r\n<SCFG_ViewClass>cRIO  node root.lvclass</SCFG_ViewClass>\r\n<sysname>cRIO</sysname>\r\n</kvpairs>"}]}

But, when the front panel is closed and selected to save changes, it saves an XML without any information

1.0.0
{"hierarchy structure":{"root":"","hierarchy":[]},"instance data":[]}
cjalanis commented 5 years ago

Added ReadTree to Close?, New?... case and solved the issue.

image