Time remaining:
[Python] Sub frame does not destroy

Programming
Tutor: None Selected Time limit: 0 Hours

I have a program i'm trying to develop but i guess i don't know the proper way to make subframes. I've looked at several examples and can't seem to get it to work destroy the frame when it's closed.  I get the following error readout (using pycharm):

Exception wx._core.PyDeadObjectError: PyDeadObjectError('The C++ part of the Choice object has been deleted, attribute access no longer allowed.',) in <bound method pvFileINdialog.__del__ of <fileIO.pvFileIOGUIFileIOdialog.pvFileINdialog; proxy of <Swig Object of type 'wxDialog *' at 0x340cc70> >> ignored

All though the interpreter takes care of the problem i would like to learn the propper way to take care of it. Here is a zip of the entire program so far.  When you run it and click "file/Import data" the subframe opens, and then when you hit the "cancel" button or the "x" button it closes but reports the error.

If moved the destroy and close commands around and nothing changes the result

The code of interest is:

#in MainFrame.py:   def fileimport(self, event):

        importprompt = pvFileIOGUIFileIOdialog.pvFileINdialog(self)

        importprompt.ShowModal()

        importprompt.Destroy() #referring to pvFileIOGUIFileIOdialog.pvFileINdialog : class pvFileINdialog(pvFileIOGUI.FileINdialog):     def __init__(self, child):         pvFileIOGUI.FileINdialog.__init__(self, child) #which refers to pvFileIOGUI.FileINdialog : class FileINdialog(wx.Dialog):     def __init__(self, child):         wx.Dialog.__init__(self, child, id=wx.ID_ANY, title=u"Select Import Method...", pos=wx.DefaultPosition,                            size=wx.Size(800, 600), style=wx.DEFAULT_DIALOG_STYLE) #and is closed by this routine in pvFileIOGUIFileIOdialog.py:     def cancelclk(self, event):         self.Close()         return 0

Oct 24th, 2013

.i can help you in your assignments...i can provide you good quality work so that you can get A gradings in your course.I can do your work in a very short time .......answers will be upto mark and correctly written..thanks.....waiting for your reply ,,ans soon...


Oct 25th, 2013

It's not an assignment. I have posted all of the code via link.  If you find a resolution let me know and i will pay you if the issue is resolved.

Oct 25th, 2013

whats about its deadline?

Oct 25th, 2013

the sooner the better

Oct 25th, 2013

ok send me your question on my e m a i l  i d

Oct 25th, 2013

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
Oct 24th, 2013
...
Oct 24th, 2013
Dec 8th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer