On 03/08/15 13:22, Ali Moradi wrote:
hi, this is my code ( http://paste.pound-python.org/show/3DZoev97e1UkWFcATKYF/)
OK I had a look at the code this time. Several points: You never set your listbox in the GUI - there is no call to grid(). Your button has no command attached to it so it does nothing when pressed. Your SQL function has a self parameter but is not a method of an object. You try to insert self into the list widget. What do you think self will contain? In fact it never gets called so its irrelevant, but if it did get called what would it contain? It looks like you are just cutting and pasting code from somewhere without really thinking about what it does or how it all fits together? You need to slow down and build it piece by piece. (I seem to recall having a similar discussion with you a couple of months ago? Yes, back in June.) For now, just get the GUI built with some dummy text. Then get the searching to work using your fixed text. Finally swap the text for the result of a SQL query. Don't rush at it and it will go faster. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
