New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'SimpleGrid' object has no attribute 'ent_but' #158

Closed
EmeraldNight opened this Issue May 1, 2017 · 6 comments

Comments

Projects
None yet
3 participants
@EmeraldNight

EmeraldNight commented May 1, 2017

I've been trying to use AppJar to set up some simple tools to use in managing the World of Tanks clan i'm in. What i currently have consists of a grid that's supposed to layout the players of the selected clan. Everything in the program works fine up until i try to add a grid row:

addGridRow("datagrid", [PlayerRank, PlayerAccountName, PlayerID, LastBattleDate, DaysSinceLB, Battles])

When this hits I get "'SimpleGrid' object has no attribute 'ent_but'" thrown back at me.

@EmeraldNight EmeraldNight changed the title from 'simplegrid to 'simplegrid' object has no attribute 'ent_but' May 1, 2017

@EmeraldNight EmeraldNight changed the title from 'simplegrid' object has no attribute 'ent_but' to 'SimpleGrid' object has no attribute 'ent_but' May 1, 2017

@jarvisteach

This comment has been minimized.

Show comment
Hide comment
@jarvisteach

jarvisteach May 1, 2017

Owner

Yes, this is another bug with the grid widget!

When adding a new row, it currently assumes you have a row of entry boxes (with a button). It first tries to remove the entry boxes, then add the row, then re-show the entry boxes.

I guess you don't have any entry boxes!

A couple of other bugs have already been reported on this widget - it is due for a bunch of fixes in the next couple of weeks, I'll add this to the list!

Owner

jarvisteach commented May 1, 2017

Yes, this is another bug with the grid widget!

When adding a new row, it currently assumes you have a row of entry boxes (with a button). It first tries to remove the entry boxes, then add the row, then re-show the entry boxes.

I guess you don't have any entry boxes!

A couple of other bugs have already been reported on this widget - it is due for a bunch of fixes in the next couple of weeks, I'll add this to the list!

@jarvisteach jarvisteach added the bug label May 1, 2017

@EmeraldNight

This comment has been minimized.

Show comment
Hide comment
@EmeraldNight

EmeraldNight May 1, 2017

Cool, throw adding entry boxes should work as a temporary workaround?

Cool, throw adding entry boxes should work as a temporary workaround?

@jarvisteach

This comment has been minimized.

Show comment
Hide comment
@jarvisteach

jarvisteach May 1, 2017

Owner

If you set action to point at a function, and set addRow to be True you'll be able to add rows, but you'll get all the extras that you might not want...

Owner

jarvisteach commented May 1, 2017

If you set action to point at a function, and set addRow to be True you'll be able to add rows, but you'll get all the extras that you might not want...

jarvisteach added a commit that referenced this issue May 25, 2017

@jarvisteach jarvisteach added this to the 0.07 milestone May 26, 2017

@jarvisteach jarvisteach self-assigned this May 30, 2017

@SecretShop

This comment has been minimized.

Show comment
Hide comment
@SecretShop

SecretShop Jul 11, 2017

I am newer to Python and i also ran across this problem when trying to populate a table with information.
I tried the following work around as stated:
showData.addGrid("g1",[["#", "Game ID", "Champ"]], nothin(), True)

nothin() is just a useless function, and i assume i set AddRow to True. Am i missing something? Thanks you!

I am newer to Python and i also ran across this problem when trying to populate a table with information.
I tried the following work around as stated:
showData.addGrid("g1",[["#", "Game ID", "Champ"]], nothin(), True)

nothin() is just a useless function, and i assume i set AddRow to True. Am i missing something? Thanks you!

@jarvisteach

This comment has been minimized.

Show comment
Hide comment
@jarvisteach

jarvisteach Jul 12, 2017

Owner

Hi @SecretShop, could you give a bit more information, including the error message. Thanks.

Owner

jarvisteach commented Jul 12, 2017

Hi @SecretShop, could you give a bit more information, including the error message. Thanks.

@SecretShop

This comment has been minimized.

Show comment
Hide comment
@SecretShop

SecretShop Jul 12, 2017

`import sqlite3
from appJar import gui

def nothin():
print("ndkjskj")

conn = sqlite3.connect('Ranked_Data.db')
c = conn.cursor()
showData = gui("Ranked Statistics")
c.execute('SELECT GAMEID, CHAMP FROM RANKED')
stuff = c.fetchall()
showData.addGrid("g1",[["#", "Game ID", "Champ"]],nothin(),True)
for k in range(1,len(stuff)):
showData.addGridRow("g1",[k, stuff[k][0], stuff[k][1]])
print("Total games: {}".format(len(stuff)))
showData.go()`

That is the code that i used if you would like to try yourself but it throws the following errors:

Traceback (most recent call last):
File "C:\Users\Shot2400\Desktop\Tut\lists.py", line 14, in
showData.addGridRow("g1",[k, stuff[k][0], stuff[k][1]])
File "C:\Users\Shot2400\AppData\Local\Programs\Python\Python36\lib\site-packages\appJar\appjar.py", line 3049, in addGridRow
self.__verifyItem(self.n_grids, title).addRow(data)
File "C:\Users\Shot2400\AppData\Local\Programs\Python\Python36\lib\site-packages\appJar\appjar.py", line 9312, in addRow
self.__removeEntryBoxes()
File "C:\Users\Shot2400\AppData\Local\Programs\Python\Python36\lib\site-packages\appJar\appjar.py", line 9379, in __removeEntryBoxes
self.ent_but.lab.grid_forget()
AttributeError: 'SimpleGrid' object has no attribute 'ent_but'

I understand the issue is being looked into i just would like to use a work around for now. Once again thank you very much!

`import sqlite3
from appJar import gui

def nothin():
print("ndkjskj")

conn = sqlite3.connect('Ranked_Data.db')
c = conn.cursor()
showData = gui("Ranked Statistics")
c.execute('SELECT GAMEID, CHAMP FROM RANKED')
stuff = c.fetchall()
showData.addGrid("g1",[["#", "Game ID", "Champ"]],nothin(),True)
for k in range(1,len(stuff)):
showData.addGridRow("g1",[k, stuff[k][0], stuff[k][1]])
print("Total games: {}".format(len(stuff)))
showData.go()`

That is the code that i used if you would like to try yourself but it throws the following errors:

Traceback (most recent call last):
File "C:\Users\Shot2400\Desktop\Tut\lists.py", line 14, in
showData.addGridRow("g1",[k, stuff[k][0], stuff[k][1]])
File "C:\Users\Shot2400\AppData\Local\Programs\Python\Python36\lib\site-packages\appJar\appjar.py", line 3049, in addGridRow
self.__verifyItem(self.n_grids, title).addRow(data)
File "C:\Users\Shot2400\AppData\Local\Programs\Python\Python36\lib\site-packages\appJar\appjar.py", line 9312, in addRow
self.__removeEntryBoxes()
File "C:\Users\Shot2400\AppData\Local\Programs\Python\Python36\lib\site-packages\appJar\appjar.py", line 9379, in __removeEntryBoxes
self.ent_but.lab.grid_forget()
AttributeError: 'SimpleGrid' object has no attribute 'ent_but'

I understand the issue is being looked into i just would like to use a work around for now. Once again thank you very much!

jarvisteach added a commit that referenced this issue Aug 2, 2017

Fixes to grid class
Initial fixes for #151, #152, #158

@jarvisteach jarvisteach closed this Aug 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment