Re: operating on groups of nodes...
On Thu, Jun 26, 2008 at 4:59 PM, Terry Brown [EMAIL PROTECTED] wrote: But Move would be trickier of course, given the rules about not being your own ancestor. So I guess the polite way would be to attempt to move all the nodes selected to the target position, and if it fails, abort and do nothing. I agree. Rather than try and work out if a move is valid before hand it might be easier to save an undo point (should do that anyway), then just back up to it if something goes wrong. The proper way is to call c.checkMoveWithParentWithWarning. Please don't use undo to back out of an improper operation: you will then be creating even more problems for redo. Edward --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups leo-editor group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: operating on groups of nodes...
On Thu, Jun 26, 2008 at 11:30 AM, Terry Brown [EMAIL PROTECTED] wrote: To be as versatile a tool as possible it seems to me that Leo needs to be able to select and operate on groups of nodes. I've seen the groupOperations.py plugin, and it's ok, but I don't really think it addresses the issue. My add as first/last child button plugin (quickMove.py) is another example of an insufficient solution to this need. I think it will be improve Leo uptake if there are simple ways to select and copy/move/delete multiple nodes, as many people will expect a tree gui element to permit this. The simplest thing that could possibly work is to mark nodes (possibly in a way distinct from standard marks) and then support commands to operate on such marked nodes. Say commands such as: clone-marked-nodes, copy-marked-nodes and move-marked nodes. These would require no changes at all to Leo's tree widget. Edward P.S. Leo's find tab has checkboxes labeled 'Mark Finds' and 'Mark Changes', which are intended to make marking groups of nodes easier. EKR --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups leo-editor group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: operating on groups of nodes...
On Thu, 26 Jun 2008 11:37:32 -0500 Edward K. Ream [EMAIL PROTECTED] wrote: The simplest thing that could possibly work is to mark nodes (possibly in a way distinct from standard marks) and then support commands to operate on such marked nodes. Say commands such as: clone-marked-nodes, copy-marked-nodes and move-marked nodes. These would require no changes at all to Leo's tree widget. Of course, the mark mechanism does parallel the idea of multiple selected nodes. Even covers the issue of different representation for the last node selected, that would be the current position, which has an graphical appearance orthogonal to marking. But to be as quick and easy as I'd expect a modern gui to be for marking multiple nodes some kind of Ctrl-click and Shift-click action would be needed. It seems knowing the state of Shift and Ctrl on the click callbacks would require poking into the Tk event currently? I.e. there's no Leo API for that info.? But Tk specificness might be ok, as I suspect other GUI tree widgets (at least the pre-packaged ones) have Ctrl and Shift multi-node selectiong behaviors. Cheers -Terry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups leo-editor group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: operating on groups of nodes...
What limitations would you put on the node's that could be simultaneously selected? Would they all have to have a common parent node? If not, what would Leo do with a paste of nodes from different parents? TL --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups leo-editor group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
Re: operating on groups of nodes...
On Thu, 26 Jun 2008 14:42:30 -0700 (PDT) TL [EMAIL PROTECTED] wrote: What limitations would you put on the node's that could be simultaneously selected? None... which is already the case with nodes that can be simultaneously marked, of course. Would they all have to have a common parent node? If not, what would Leo do with a paste of nodes from different parents? Well, Paste's probably no big deal because it would just be a matter of making a copy of each of the selected nodes at the target point. Of course clones will find a way of making that more complicated, that's their job :-) But Move would be trickier of course, given the rules about not being your own ancestor. So I guess the polite way would be to attempt to move all the nodes selected to the target position, and if it fails, abort and do nothing. Rather than try and work out if a move is valid before hand it might be easier to save an undo point (should do that anyway), then just back up to it if something goes wrong. Seem reasonable? Cheers -Terry --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups leo-editor group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---