[Pythonmac-SIG] menu bar missing mac+py2app

Thomas thomas at eforms.co.nz
Fri Feb 4 03:07:58 CET 2005


Hi Bob,

 

I have simplified my script.

 

from wxPython.wx import *

ID_LOGIN=101

ID_OPEN=102

ID_ABOUT=109

ID_EXIT=110

 

class MainWindow(wxFrame):

    def __init__(self,parent,id,title):

        wxFrame.__init__(self,parent,wxID_ANY, title, size = ( 800,600),

 
style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE)

        # Setting up the menu.

        filemenu= wxMenu()

        filemenu.Append(ID_LOGIN, "&Login"," Please login to Upload files")

        filemenu.AppendSeparator()

        filemenu.Append(ID_OPEN, "&Open"," Browse directories/files")

        filemenu.AppendSeparator()

        filemenu.Append(ID_ABOUT, "&About"," Information about this
program")

        filemenu.AppendSeparator()

        filemenu.Append(ID_EXIT,"E&xit"," Terminate the program")

        # Creating the menubar.

        menuBar = wxMenuBar()

        menuBar.Append(filemenu,"&File") # Adding the "filemenu" to the
MenuBar

        self.SetMenuBar(menuBar)  # Adding the MenuBar to the Frame content.

        self.Show(true)

app = wxPySimpleApp()

frame = MainWindow(None, -1, "Menu Client")

app.MainLoop()

 

 

This script works fine when I run it with pythonw..

Is the Python interpreter pointed by pythonw & /usr/bin/python one & the
same.

 

The menu is still missing when create an application using py2app..

 

Regards

Thomas

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20050204/811c512f/attachment.htm


More information about the Pythonmac-SIG mailing list