![]() |
|
#1
|
|||
|
|||
Python/Tk GUIHi,
I am making a GUI with the help of python. The problem is that when I destroy a certain frame the data structure assciated with it, does'nt change. Can anybody offer any help on this? I have attached the program and it would be great if anybody can offer some useful suggestions. |
|||
|
#2
|
||||
|
||||
Re: Python/Tk GUIWell, I get the following error when I click the "Add" button. Do you?
Quote:
Basically what's happening with this error is that this line Quote:
What exactly is this program supposed to be doing? __________________
Start Programming with Python-A beginner's guide to programming and the Python language. ------------- Common Sense v2.0-Striving to make the world a little bit smarter. |
|
#3
|
|||
|
|||
Re: Python/Tk GUIHi,
I apologise for posting the file I was playing with, I am attaching the program in working condition and when u press the "ADD" button new frames will build up and when u press "delete button those frames will be destroyed ". My problem is that these frames only get destroyed in Tk not in python's data structure. Kindly try again. Regards Ash ------------------------------------------------------------------------- Python Code:
attachments weren't working Quote:
Last edited by cable_guy_67 : 31-Aug-2006 at 14:07.
Reason: Please surround your Python code with [py] your code [/py]
|
|
#4
|
||||
|
||||
Re: Python/Tk GUINot to sound lazy, but could you try again using [py][/py] around your code? It will keep the indents in your code (plus highlight it appropriately). I tried working with your code but I'm not sure where the indents are supposed to be.
__________________
Start Programming with Python-A beginner's guide to programming and the Python language. ------------- Common Sense v2.0-Striving to make the world a little bit smarter. Last edited by cable_guy_67 : 31-Aug-2006 at 14:08.
Reason: Added [noparse] around [py]
|
|
#5
|
||||
|
||||
Re: Python/Tk GUIThanks for the fix, cable buddy.
![]() Ash, try adding Python Code:
__________________
Start Programming with Python-A beginner's guide to programming and the Python language. ------------- Common Sense v2.0-Striving to make the world a little bit smarter. |
|
#6
|
|||
|
|||
Re: Python/Tk GUIThanks crystal but that doesnt solve the purpose.
It might mean that I need to develop my data structure from scratch every time i press "remove" |
|
#7
|
||||
|
||||
Re: Python/Tk GUII'm confused. If I'm reading your code correctly, every time the "ADD" button is pressed a new frame is added to the sub_frame list. Each sub_frame then has the band and channel choices available.
Now, when the sub_frame is removed, do you want to keep the data that sub_frame and print it out or do you want the data deleted along w/ the frame? __________________
Start Programming with Python-A beginner's guide to programming and the Python language. ------------- Common Sense v2.0-Striving to make the world a little bit smarter. |
|
#8
|
|||
|
|||
Re: Python/Tk GUIWhen the sub_frame is removed (destroyed), I want the data associated with it destroyed as well [which I think means updating that sub_frame list.]
Thanks for the help. Quote:
|
|
#9
|
||||
|
||||
Re: Python/Tk GUIWell, I'd imagine that you need to do something directly to the sub_frame when you call delete_frame. I'm not sure what you may want to do, but you could slice off the last entry, use the del method, or another way to remove the entries from the list.
__________________
Start Programming with Python-A beginner's guide to programming and the Python language. ------------- Common Sense v2.0-Striving to make the world a little bit smarter. |
|
#10
|
|||
|
|||
Re: Python/Tk GUIQuote:
thats the problem, i need to keep a trace of pointers. It is possible with if I can somehow relate every delete method back to its pointer and than update list. For that I assume i need to add arguements to my object to trace it....how i am gonna do it...thats what i dont know thanks for the help.... |
Recent GIDBlog
Vista ?Widgets? on Windows XP by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The