append_new_node (PopUpMenu)

         # File lib/json/editor.rb, line 388
    388:       def append_new_node(item)
    389:         if parent = selection.selected
    390:           parent_type = parent.type
    391:           case parent_type
    392:           when 'Hash'
    393:             key, type, content = ask_for_hash_pair(parent)
    394:             key or return
    395:             iter = create_node(parent, 'Key', key)
    396:             iter = create_node(iter, type, content)
    397:             toplevel.display_status(
    398:               "Added a (key, value)-pair to '#{parent_type}'.")
    399:             window.change
    400:           when 'Array'
    401:             type, content = ask_for_element(parent)
    402:             type or return
    403:             iter = create_node(parent, type, content)
    404:             window.change
    405:             toplevel.display_status("Appendend an element to '#{parent_type}'.")
    406:           else
    407:             toplevel.display_status("Cannot append to '#{parent_type}'!")
    408:           end
    409:         else
    410:           type, content = ask_for_element
    411:           type or return
    412:           iter = create_node(nil, type, content)
    413:           window.change
    414:         end
    415:       end