Is this the “correct” way to remove abstracted items from a wx.Menu?
items = self.SomeMenu.GetMenuItems()
for stuff in items:
self.SomeMenu.RemoveItem(stuff)
It works for me… however when something works for me, there is
always a reply saying something to the effect “I would do it this way.”
And in many cases the “I would do it this way.” is better…
And lastly what is “foo” I see it all over the place.
I would do it this way:
items = self.SomeMenu.GetMenuItems()
for stuff in items:
self.SomeMenu.RemoveItem(stuff)
Though I do have to wonder if your removing
all the items from a menu, why not just delete/replace the menu completely?
-Brian
Brian Fett
1280 Disc Dr
SHK224
Shakopee, MN 55379
Phone: (952)402-2595
Brian.D.Fett@seagate.com
"Steve Freedenburg"
stevefreedenburg@charter.net
Sent by: wxpython-users-bounces@lists.wxwidgets.org
No Phone Info Available
07/30/2008 11:12 PM
Please respond to
wxpython-users@lists.wxwidgets.org
To
wxpython-users@lists.wxwidgets.org
cc
Subject
[wxpython-users] Is this the correct?
What is “foo?”
Is this the “correct” way to remove
abstracted items from a wx.Menu?
items = self.SomeMenu.GetMenuItems()
for stuff in items:
self.SomeMenu.RemoveItem(stuff)
It works for me… however when something
works for me, there is
always a reply saying something to the effect
“I would do it this way.”
And in many cases the “I would do it
this way.” is better…
And lastly what is “foo” I
see it all over the place.`_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
`