Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Outliner with drag/drop reordering
-
@ihf What I could program without too much difficulties would be:
- in file1
- tap an outline => popup menu
- new option 'cut one outline and its children'
- save in clipboard outline, text, infos about dates, image...
- same run or not
- in file 2
- tap an outline => popup menu
- new option 'paste'
- insert clipboard rows like I did for drop operation in move outlines
Of course, if you want to cut outline without children, or even several rows, we have to imagine a way to identify them
your opinion please?
- in file1
-
@cvp I think it’s only worth doing if there is a way to select multiple portions of the outline. If that is complicated, it may not be worth the effort. If it’s only one line then it’s just as easy to copy and paste the text into another outline using the standard cut and paste.
-
@ihf said:
select multiple portions
I could do it (almost all 😂) but how could we select the multiple lines? Did you think a manner?
For instance,
- tap first line/popup/option cut-select first
- tap last line/popup/option cut-select last
Or better, more complex to develop:
- tap first line to be cut, popup, select option cut
- program gives a rubber cursor, with extremity 1 fixed in first outline and you move the 2nd extremity unto the last line. When you raise the finger, cut process begins
Or
- tap first line to be cut, popup, select option cut
- script cleans all checkboxes, except this one of the first outline to be cut, with a red check
- you tap all lines needed to be cut
- and we imagine a way to terminate the selection to start cut process
-
@cvp I think the most common way is to have a select button and then allow touch of one or more items and then cut/copy followed by paste somewhere (could be in same outline or a different outline)
-
@ihf One question more. There is an option "delete outline with its children"
Quid for cut? If we cut a line, are its children also cut?
-
@cvp I’m thinking it would be desirable to be able to move child nodes without moving all children under a parent so I’m inclined to say permit selection of individual items. Does that make sense to you?
-
@ihf said:
Does that make sense to you?
Yes, but which will be the level of a child if its parent disappears?
-
@cvp good question. How about parents move with children but children can be moved without a parent?
-
@ihf seems good. I'll begin tomorrow but it is not a small functionality, thus patience
-
@ihf just to show how it will look (no action is yet programmed)
-
@cvp looks good! When does paste show up as an option?
-
@ihf said:
When does paste show up as an option?
-
Not yet studied. I wonder if it would not be better to offer paste in the usual popup menu since you only have to select a single row for the paste action. Your opinion please?
-
For each (un)selected outline, its eventual children will be automatically (un)selected. Do you agree?
-
the selected lines must they not be contiguous?
-
You said "move". Do you mean copy?
How about parents move with children but children can be moved without a parent?
-
-
@cvp 1. Yes,that sounds right.
2. Yes
3.I was thinking that they did not need to be contiguous
4. I was thinking move but now that you mention it, it should probably be an option. -
@ihf said:
I was thinking move but now that you mention it, it should probably be an option.
Not sure, I think we have enough with
- Delete = delete without saving first in clipboard
- Cut = delete but saving first in clipboard
- Copy = saving in clipboard
- Paste clipboard
Move = Cut followed by a Paste
-
-
@ihf Another question: when we drag and drop, you can drop under an outline or under its text. When we paste, we will paste rows under the outline, that will say with same level. We could also paste as children of target outline. But how could we differentiate?
-
@cvp I was thinking that the lines to be moved would be placed in the 2nd outline at whatever point was selected and that the target outline would be renumbered to accommodate the pasted items. Am I forgetting something?
-
@ihf no, you right but pasted lines could be inserted after the selected row,
as same level or as child, like we can do with the drop if you drop under a row or at it right.
Ok, let us forget, you will test and give feedback when ready -
Version V00.87 - support delete/cut/copy/paste - new button "select" in top menu - shield protecting top menu - redisplay all rows with selection button hiding checkbox and disabling hide-children-button/outline/text/image - display a popup menu with delete/cut/copy/cancel options - selection button filled in red if selected, yellow if unselected - for each (un)selected outline, children are automatically (un)selected - if copy/cut option, save selected lines in a file outline.clipboard - save level/outline/text/dates/font-attributes but not eventual due date calendar event identifier and hidden flag - delete/cut process - add option paste in general popup menu of an outline - paste the content of the file outline.clipboard with automatic renumbering nb: the file is not removed and could be pasted several times - horizontal popup menu (only available on iPad) becomes an ui.ScrollView, horizontally scrollable, so all options are reachable, even if in split view, or if too much options to be all visible
don't try to use undo anymore, it doesn't work at all and no idea why
Any negative or positive criticism is welcome
-
@cvp I tried to select a line (just touching the item’s level #) and got:
Traceback (most recent call last): File "_ctypes/callbacks.c", line 234, in 'calling callback function' File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/gestures.py", line 402, in gestureAction handler_func(data) File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/outline.py", line 3841, in long_press_handler found = self.found_redline AttributeError: 'Outliner' object has no attribute 'found_redline'