Load the file named filename into the editor as a JSON document.
# File ext/json/lib/json/editor.rb, line 1247
def load_file(filename)
if filename
if File.directory?(filename)
Editor.error_dialog(self, "Try to select a JSON file!")
nil
else
@filename = filename
if data = read_data(filename)
toplevel.display_status("Loaded data from '#@filename'.")
end
display_title
data
end
end
end