Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

How to remove a node from a script?

Help
Anonymous
2012-10-24
2013-04-11

  • Anonymous
    2012-10-24

    Hi,

    I've tried successfully to modify nodes, but I cannot succeed removing (deleting) any node with a script:

    None of the 2 functions coming in following code works (no warning or error message)

    print "Child node: '"+aChildNode.getShortText(C)+"\n";
    print "Parent node: '"+parentNode.getShortText(C)+"\n";
    aChildNode.removeFromParent();
    parentNode.remove(aChildNode);

    both variables are freemind.modes.mindmapmode.MindMapNodeModel type

    Any idea to help? Is there any limitation preventing script to delete nodes?

     
  • Hi,

    the only methods you should call from a script to alter the map are those of MindMapActions, where a "c.deleteNode(node)" is contained. It will update the view and the model and can be undone.

    HTH, Chris