Ticket #40377

Add listbox stack display

Date d'ouverture: 2020-05-03 04:57 Dernière mise à jour: 2020-05-11 04:32

Rapporteur:
Propriétaire:
État:
Atteints
Composant:
Priorité:
4
Sévérité:
2
Résolution:
Fixed
Fichier:
Aucun

Détails

Long ago I implemented a ListBox widget for displaying the stack that allowed you to drag-n-drop items on the stack to rearrange them.

Now that the log and scratch text are combined in one window I think the stack viewer might be a good addition. (Hopefully I can find the old code!)

Ticket History (3/6 Histories)

2020-05-03 04:57 Updated by: sforman
  • New Ticket "Add listbox stack display" created
2020-05-10 03:07 Updated by: sforman
Commentaire

Found the old code (at least one version of it): https://github.com/calroc/xerblin/releases/tag/oldroot

2020-05-10 10:32 Updated by: sforman
Commentaire

Checked it out and ran it, it worked without any problems.

xerblin$ PYTHONPATH=. bin/xerblin-fresh
2020-05-10 11:33 Updated by: sforman
Commentaire

https://osdn.net/projects/joypy/scm/hg/Joypy/commits/c174cb0018d8d1dab80349b3d76c4d94a3f5faa4

Extracted the list box widget.

It takes a list(-like object) and rearranges it on successful drag. I think the easiest thing to do is just brute convert from stack to list and back as needed. No fancy sync.

Going from the DnD operation to the World is straightforward. Going from the world to the listbox involves overriding the print_stack() method I think.

2020-05-11 00:45 Updated by: sforman
Commentaire

https://osdn.net/projects/joypy/scm/hg/Joypy/commits/6a58e176e9ea95361fb1060deda887c3ba38f515

Much nicer.

Still some little issues:

  • I don't know what would happen if you put a really long string or list on there (or a really large int for that matter.)
  • It's not Python 3 compatible (yet).
  • The log no longer needs to display the stack? You would have to paste or paste-cut the stack items to click on them because they're not available by default on the log text. If the log only records the commands (with no "joy?" text) then the log becomes joy source (except for e.g. output of opendoc/help.)
2020-05-11 04:32 Updated by: sforman
  • Résolution Update from Aucun to Fixed
  • État Update from Ouvert to Atteints

Attachment File List

No attachments

Modifier

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Connexion