jarvisteach / appJar

Simple Tkinter GUIs in Python
http://appJar.info
Other
615 stars 68 forks source link

TypeError in separator #552

Closed Lithimlin closed 5 years ago

Lithimlin commented 5 years ago

Bug Report


Context


I'm making a UI for a Markov Word Generator and tried to add a horizontal separator to my widget.

Expected Behaviour


A horizontal separator is added

Actual Behaviour


I get a TypeError

Any error messages produced by appJar


Traceback (most recent call last):
  File "gui.py", line 26, in <module>
    app.separator("sep")
  File "/home/lithtop/Documents/Markov-Names/env/lib/python3.7/site-packages/appJar/appjar.py", line 9789, in separator
    return self.addHorizontalSeparator(*args, **kwargs)
  File "/home/lithtop/Documents/Markov-Names/env/lib/python3.7/site-packages/appJar/appjar.py", line 9792, in addHorizontalSeparator
    return self._addSeparator("horizontal", row, column, colspan, rowspan, colour)
  File "/home/lithtop/Documents/Markov-Names/env/lib/python3.7/site-packages/appJar/appjar.py", line 9802, in _addSeparator
    self._positionWidget(sep, row, column, colspan, rowspan)
  File "/home/lithtop/Documents/Markov-Names/env/lib/python3.7/site-packages/appJar/appjar.py", line 3850, in _positionWidget
    row, column, colspan, rowspan = self._getRCS(row, column, colspan, rowspan)
  File "/home/lithtop/Documents/Markov-Names/env/lib/python3.7/site-packages/appJar/appjar.py", line 3621, in _getRCS
    self.containerStack[-1]['emptyRow'] = row + 1
TypeError: can only concatenate str (not "int") to str

Sample code, demonstrating the issue


with gui("Markov Word Generator", bg="white") as app:
    [...]
    app.separator("sep")
    [...]

What steps are needed to reproduce the bug


see sample code above.

Version Information


appJar: 0.93.0 
Python: 3.7.0 
TCL: 8.6, 
TK: 8.6 
Platform: Linux 
pid: 16789
locale: en_US
jarvisteach commented 5 years ago

This is actually a bug in the documentation.

Separators don’t have a ‘title’ or ‘value’.

If you remove the ‘sep’ argument it should work.

I’ll update the docs and add some better validation in the code.