Ticket #40377

Add listbox stack display

오픈 날짜: 2020-05-03 04:57 마지막 업데이트: 2020-05-11 04:32

Reporter:
소유자:
Status:
Closed
Component:
MileStone:
Priority:
4
Severity:
2
Resolution:
Fixed
File:
None

Details

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
댓글 올리기

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
댓글 올리기

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

xerblin$ PYTHONPATH=. bin/xerblin-fresh
2020-05-10 11:33 Updated by: sforman
댓글 올리기

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
댓글 올리기

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
  • Resolution Update from None to Fixed
  • Status Update from Open to Closed

Attachment File List

No attachments

Edit

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