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
-
@cvp I'm only mentioning it now because I will forget otherwise :-)
-
@ihf said:
could we at some point add support for external keyboard tab and back tab?
Sure, but I don't have any keyboard, thus you have to tell me which \xnn the keys generate.
-
@cvp OK ,need to find how to do that for tab and shift tab.
-
@ihf ok, I stop now
-
@ihf little script which should give the hexadecimal of your pressed keys
import ui class MyTextFieldDelegate (object): def textfield_should_change(self, textfield, range, replacement): for character in replacement: print(character, character.encode('utf-8').hex()) return True tf = ui.TextField() tf.delegate = MyTextFieldDelegate() tf.present('sheet')
-
@cvp when using the external keyboard, tab (demote) shows as ‘09’ as does shift tab (promote).
-
@ihf said:
tab (demote) shows as ‘09’ as does shift tab (promote).
Weird but I can't help. Perhaps somebody can help?
-
@ihf New V00.16 available, with
Version V00.16 - support "log" - new general setting - log each typed key - play log typed keys - log each move - play log move
It supports a log of all your actions (I hope) and a way to play the log so I could reproduce a problem to (try to) correct it.
The script has a new setting " log active".To get a log:
- set the setting log active
- create a new file
- do your actions
- terminate the program (the log file is created even if you don't save the file itself)
- rename manually outline.log in any xxx.log
To play the log
- set the setting log active
- create a new file
- select in Files, play log
- it should run automatically your commands
To send me a log
- post by pasting the log content (editable file)
-
-
@cvp Wow! I will test as soon as I am able (probably not before this evening).
-
@cvp I turned on the log and immediately got an error on line 1081 saying Outliner object has no attribute log_fil
-
@ihf I think you have turned it after a file has been loaded
Please try to set the flag, then new file
-
@ihf To avoid confusion between long press / double tap on an outline,
and standard gestures for text selection (copy, paste), a solution could be a button covering only the outline, but not the text it-self.And a single (or double as you prefer) tap on the outline would generate the popup menu (if needed), and a longpress on the outline would start the drag and drop process.
Thus,
- own process by gesture on the outline
- standard process by gesture on text it-selfDo you want that?
-
Version V00.18 - bugs - correction of bug "bad renumbering after drop" - correction of bug "crash 'tuple index out of range' if change outline type" - correction of bug "crash if drop after a line without outline"
I hope that you did not spend too much time in testing the drop because its (new) renumbering was very bad, sorry for that.
-
@ihf Shift tab on external keyboard: try Control + Shift + Tab
And did you set:
Control iPad with an external keyboard
Go to Settings > Accessibility > Keyboards, tap Full Keyboard Access, then turn on Full Keyboard Access. Control your iPad using keyboard shortcuts. -
@cvp I turned on log before creating a file it. I created an outline and saved it but when I looked at the log file it was empty.
-
@ihf weird, I do
- log on
- new
- type outline
- end without saving
outline.log contains what I typed
Don't come back in the script before you check the .log
The log is not xxx.log but always outline.log, did you know it?
-
@ihf No news, no answer to my post beginning with "To avoid confusion between long press / double tap on an outline"...
Do we stop the project? -
@cvp I'm sorry for the delay in responding. My problem is that I can't seem to reliably get long-press to be recognized and therefore begin the drag/drop. Is there a specific part of the line that needs to be touched to make this work? Also renumbering is failing for some moves.
Here is a log file and an image of the outline (which ought not to be a valid outline).
0,0,01
4,4,61
5,5,0a
10,10,62
11,11,0a
16,16,63
17,17,0a
22,22,64
23,23,0a
28,28,01
30,30,65
31,31,0a
38,38,66
39,39,0a
drop,12,32,40 -
@ihf said:
My problem is that I can't seem to reliably get long-press to be recognized and therefore begin the drag/drop. Is there a specific part of the line that needs to be touched to make this work?
The problem comes from the fact that the long press gesture is linked to a TextView which can also be touched by standard gestures for select/copy/paste.
That's why I propose to override the outline text by a transparent view which would be touched by a long press while the text it-self would stay touchable by standard gestures of a text.
So, popup menu and long press should only be active on the outline and standard menu should only be active on the text it-self.
But I need your ok before to develop this important modif.