jarvisteach / appJar

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

Is there a way to pass parameters to a subwindow/button instance? #640

Open NathanWailes opened 3 years ago

NathanWailes commented 3 years ago

I'm a freelance programmer who has been hired to take over a project started by another developer. The project uses appJar to create a Windows GUI for the purpose of searching real estate listings via some APIs we have access to.

Something that strikes me as "ugly" about the existing code is that it uses the names of various buttons and windows to pass information to an individual instance of a button/subwindow. It does this because it wants to be able to support having multiple "copies" of the same subwindow/button open at once, with each button/subwindow "knowing" which real estate listing it is associated with.

Is there a cleaner way of handling this use-case than by passing data about the listing in the name of the button/subwindow?