Fix type error in PrintComponent

This commit is contained in:
2021-09-27 19:44:25 -06:00
parent 7116b744c4
commit 6eb8aafb77
2 changed files with 5 additions and 4 deletions

View File

@@ -31,8 +31,9 @@
// After modifying an entry, this must be called. If you are writing in a createEntry
// initializer or a system's processEntry function, this will happen automatically.
// Otherwise, you can guarantee it happens automatically by using the (withWritableEntry)
// and (withWritableComponents) macros in Lib.kiss
// Also most functions that only affect the Entry, not its components' contents,
// will call this automatically though (withWritableEntry).
// When changing components, use the (withWritableComponents) macro in Lib.kiss
(method refreshEntry [:Entry e]
(_saveEntry e)
(doFor system systems
@@ -43,7 +44,7 @@
(joinPath archiveDir "entries" (e.id.withExtension "json"))
(Json.stringify e)))
(method componentData [:Entry e :String componentType]
(method :Dynamic componentData [:Entry e :String componentType]
(haxe.Json.parse (File.getContent (joinPath archiveDir "components" "$(dictGet e.components componentType).json"))))
(method fullData [:Entry e]

View File

@@ -184,7 +184,7 @@
(defCommand PrintComponent [entries (SelectedEntries null null)
componentType (Text null)]
(doFor e entries (ui.displayMessage (archive.componentData e componentType))) [])
(doFor e entries (ui.displayMessage (Std.string (archive.componentData e componentType)))) [])
(defCommand CreateEntry [name (Text null)]
[(archive.createEntry ->e