Found that inheritance / polymorphism could be done, but not clear in README:
func save():
save_dialog.show()
save_dialog.file_selected.connect(func(path: String):
var file = FileAccess.open(path, FileAccess.WRITE)
file.store_line(ForgeJSONGD.class_to_json_string(my_abstract_resource_implementation, true)), # save the file type
ConnectFlags.CONNECT_ONE_SHOT)
func open():
open_dialog.show()
open_dialog.file_selected.connect(func(path: String):
var previously_saved: AbstractResource = ForgeJSONGD.json_file_to_class(null, path) # null commented in scripts to use the saved type
do_something(previously_saved), # this carries the previous implementation's type correctly
ConnectFlags.CONNECT_ONE_SHOT)
Found that inheritance / polymorphism could be done, but not clear in README: