This is how you solve problems

Categories: General, Tech | Pubby Cash Received:  0 | Click to Award

So I solved the buttons problem in the GoPubby app, well kind of. There is still a bug where the logout button does not work. Additionally, content for some longer posts is cut off from the top of the screen. So how exactly did I solve the buttons problem? First, let me tell you what the problem was. So 15 to 20 titles of recent posts from the GoPubby website were displayed as scrollable buttons. When I click on one of the posts, it should transition to a page with only that post and its content on it. However, when I did it, I gave me many errors, such as 'NoneType object does not have attribute text' or something like that. I knew the answer lied within object properties, so I queried many websites and watched many YouTube videos so I could get a better understanding. Tech with Tim was a great help. Using his code, I added to my object property and tried it. It worked. But why didn't it work for me? I think the answer lies in the type of class that I had defined. In my class, there was an 'init' function with the 'super()' constructor. When inheritance is involved, the Python 'super()' function allows us to refer the superclass implicitly. So, Python super makes our task easier and comfortable. While referring to the superclass from the subclass, we don’t need to write the name of the superclass explicitly. It's kind of like when you want to import a module, you could either use 'import' or you could use 'from this import that'. I don't understand why the 'init' function caused my object property to mess up, but by using someone else's code, I got a new perspective and the data successfully got passed into the app. I'm still toying around with what Kivy can do.


Published from: Pennsylvania US
Liked by: H2O, Evan Tang, fnfOzvSR 

Daily Deals


MECHANICSBURG WEATHER