MCPcopy Create free account
hub / github.com/NatLabRockies/SAM / Write_JSON

Method Write_JSON

src/ide.cpp:2159–2171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2157
2158
2159bool UIEditorPanel::Write_JSON(const wxString& name)
2160{
2161 bool ok = true;
2162 m_ipd.Form().Copy(m_exForm);
2163 m_ipd.Form().SetName(name);
2164 // note: ipd.Variables() already up-to-date
2165 m_ipd.CbScript() = m_callbackScript->GetText();
2166 m_ipd.EqnScript() = m_equationScript->GetText();
2167 wxString ui_path = SamApp::GetRuntimePath() + "/ui/" + name;
2168 std::string ff(ui_path + ".json");
2169 ok = m_ipd.Write_JSON(ff, ui_path);
2170 return ok;
2171}
2172
2173
2174bool UIEditorPanel::Load( const wxString &name )

Callers 5

SaveDefaultsMethod · 0.45
SaveAsJSONMethod · 0.45
OnSaveAsTypeMethod · 0.45
OnModifyMethod · 0.45
OnDeleteVarMethod · 0.45

Calls 3

GetTextMethod · 0.80
CopyMethod · 0.45
SetNameMethod · 0.45

Tested by

no test coverage detected