[SOLVED} Key error. Frame marked as main in wxapp does not match actual frame

Tanay Shah <[email protected]> Fri, 20 Mar 2009 11:17:52 +0530
Newsgroups gmane.comp.ide.boa-constructor.user
Message-ID <[email protected]>
Ohh ohk.Got it

I had to change import Frame1 to import MainFrame and make similar changes
everywhere.

On Fri, Mar 20, 2009 at 11:14 AM, Tanay Shah <[email protected]> wrote:

> Hello there,
> I'm developing a wxapp using Boa.
> I have a mainframe.py file which is the starting point of the allpication.
> Now i've edited and saved mainframe.py and when i run the app, it shows the
> older version of main frame, while when i run module mainframe.py, that
> shows properly.
>
> This did not happen before, only after i renamed the mainframe.py file from
> outside boa, i think its started happenin
>
> Source for wxapp file:
>
> #!/usr/bin/env python
> #Boa:App:BoaApp
>
> import wx
>
> import Frame1
>
> modules ={'Dialog_SendSMS': [0, '', u'Dialog_SendSMS.py'],
>  'Dialog_SchSMS': [0, '', u'Dialog_SchSMS.py'],
>  u'Dialog_Transliterate': [0, '', u'Dialog_Transliterate.py'],
>  'MainFrame': [1, 'Main frame of Application', u'MainFrame.py'],
>  'Wizard_Connect': [0, '', u'Wizard_Connect.py']}
>
> class BoaApp(wx.App):
>     def OnInit(self):
>         self.main = Frame1.create(None)
>         self.main.Show()
>         self.SetTopWindow(self.main)
>         return True
>
> def main():
>     application = BoaApp(0)
>     application.MainLoop()
>
> if __name__ == '__main__':
>     main()
>
> -----------------------------------------------------------------------
>
> Also, when i try to assign mainframe.py as main module, i get following
> error:
>
> 11:10:39 AM: Traceback (most recent call last):
> 11:10:39 AM:   File
> "C:\Python25\Lib\site-packages\boa-constructor\Views\AppViews.py", line 227,
> in OnMakeMain
> self.model.changeMainFrameModule(self.GetItemText(self.selected))
> 11:10:39 AM:   File
> "C:\Python25\Lib\site-packages\boa-constructor\Models\PythonEditorModels.py",
> line 1001, in changeMainFrameModule     impLine = module.imports[mod][0]-1
> 11:10:39 AM: KeyError: 'MainFrame'
>
>
> --
> Tanay Shah
>



-- 
Tanay Shah

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com

_______________________________________________
Boa-constructor-users mailing list
Boa-constructor-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/boa-constructor-users