menuGetItems() ???

hello, I’m trying to remove all but specific items from a menu. I do the following:

clear device menu items

for id in self.menu.GetMenuItems():
if id != wxID_ITEMS0 and id != wxID_ITEMS6 and id != wxID_MENUITEMS5:
self.menu.DeleteItem(id)

wxID_ITEMS5, wxID_ITEMS6, wxID_ITEMS0 are menu item id’s returned from wx.NewId(). the problem is that I don’t think I’m using GetMenuItems correctly. because the id for the three items wxID_ITEMS0, wxID_ITEMS5, wxID_ITEMS6, are integers returned from wx.NewId() and the list returned from getmenuitems does not contain integers. i would like a list of the menu item id’s, how can I get there using getmenuitems()???

thanks!!

Jeff

···

Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.

GetMenuItems returns instances, not ids; you need:
     for item in self.menu.GetMenuItems():
         id_ = item.GetId()

···

At 08:50 PM 9/26/2006, you wrote:

hello, I'm trying to remove all but specific items from a menu. I do the following:

# clear device menu items
for id in self.menu.GetMenuItems():
    if id != wxID_ITEMS0 and id != wxID_ITEMS6 and id != wxID_MENUITEMS5:
        self.menu.DeleteItem(id)

wxID_ITEMS5, wxID_ITEMS6, wxID_ITEMS0 are menu item id's returned from wx.NewId(). the problem is that I don't think I'm using GetMenuItems correctly. because the id for the three items wxID_ITEMS0, wxID_ITEMS5, wxID_ITEMS6, are integers returned from wx.NewId() and the list returned from getmenuitems does not contain integers. i would like a list of the menu item id's, how can I get there using getmenuitems()???

thanks!!

Jeff

hello, I just upgrade to wxpython 2.7.2 and I am getting this error when I try to launch my wxapp:

“This application has failed to start because wxmsw26uh_vc.dll was not found. Re-installing the application might fix this problem”

I’m also using matplotlib 0.9 and python 2.5… my app was running smoothly until I upgraded wxpython, python, and matplotlib.

any ideas of how I might fix this???

thanks!!

Jeff

···

Don’t be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.

hello, I just upgrade to wxpython 2.7.2 and I am getting this error when I try to launch my wxapp:

“This application has failed to start because wxmsw26uh_vc.dll was not found. Re-installing the application might fix this problem”

I’m also using matplotlib 0.9 and python 2.5… my app was running smoothly until I upgraded wxpython, python, and matplotlib.

any ideas of how I might fix this???

thanks!!

Jeff

···

No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.

Hi Jeff,

Jeff Peery wrote:

hello, I just upgrade to wxpython 2.7.2 and I am getting this error when I try to launch my wxapp:
"This application has failed to start because wxmsw26uh_vc.dll was not found. Re-installing the application might fix this problem"

This is related to your matplotlib version. Matplotlib currently is build against wxPython 2.6 unicode and needs this dll on some operations (don't ask me which ones, I don't know). I believe there is some work going on to try to remove this dependency for a future matplotlib release, but at that point it will probably required wxPython 2.8 or newer (at least that is my understanding).

Werner

···

I'm also using matplotlib 0.9 and python 2.5.... my app was running smoothly until I upgraded wxpython, python, and matplotlib.
any ideas of how I might fix this???
thanks!!
Jeff

------------------------------------------------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile <http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail&gt; and
always stay connected <http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail&gt; to friends.
------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.18.3/696 - Release Date: 21/02/2007 15:19

hello,
I've been having some trouble with keeping track of my dialogs in my
wx application. I have a dialog that I can open with a button click
and I want the user to only have one open at anytime. the way i was
thinking of handling this is by the following:

    def __init__(self, parent):
         self.dlg = None

    def OnDlgButton(self, event):
        if not self.dlg:
          self.dlg= dlg.create(self)
          self.dlg.Show()

so this doesn;t work completely well, and I am not really sure what
happens to the handle after the dlg is destroyed. I imagine there is
a better way to check if a dlg/frame exists... but I'm a newby. how
is this typically done?

The above code should work as you expect, given certain constraints...

- Josiah

import wx
a = wx.App(0)
b = wx.Dialog(None)
help(b.Destroy)

Help on method Destroy in module wx._core:

Destroy(*args, **kwargs) method of wx._windows.Dialog instance
    Destroy(self) -> bool

    Destroys the window safely. Frames and dialogs are not destroyed
    immediately when this function is called -- they are added to a list
    of windows to be deleted on idle time, when all the window's events
    have been processed. This prevents problems with events being sent to
    non-existent windows.

    Returns True if the window has either been successfully deleted, or it
    has been added to the list of windows pending real deletion.

bool(b)

True

b.Destroy()

True

bool(b)

True

a.MainLoop()
bool(b)

False

···

Jeff Peery <jeffpeery@yahoo.com> wrote: