wx.Menu.Insert() position shift 2 in wxpython 2.9.2

I have a text editor script. It works fine in 2.9.1 or before. When testing in 2.9.2. the history records(menu item) in menu ‘File’ are all appended to the end. The normal should be inserted before last 2. That is, executing menu.Insert(0, …), the menu item will be the 3rd, not the 1st.

Mark

Platform? Please make a small runnable sample that demonstrates the problem. MakingSampleApps - wxPyWiki

···

On 2/3/11 9:01 AM, Mark Weng wrote:

I have a text editor script. It works fine in 2.9.1 or before. When
testing in 2.9.2. the history records(menu item) in menu 'File' are all
appended to the end. The normal should be inserted before last 2. That
is, executing menu.Insert(0, ...), the menu item will be the 3rd, not
the 1st.

--
Robin Dunn
Software Craftsman

I use Windows XP 32bit.

In fact, I wrote a sample in c++ code. I got the same 'shift 2' problem in wxWidgets 2.9.2. I also compile it in 2.9.1 and this build did run as expected.

Mark

···

On 2/3/11 9:01 AM, Mark Weng wrote:

I have a text editor script. It works fine in 2.9.1 or before. When
testing in 2.9.2. the history records(menu item) in menu 'File' are all
appended to the end. The normal should be inserted before last 2. That
is, executing menu.Insert(0, ...), the menu item will be the 3rd, not
the 1st.

Platform? Please make a small runnable sample that demonstrates the
problem. MakingSampleApps - wxPyWiki

Ok, create a ticket for it at trac.wxwidgets.org if you haven't already done so. Include a patch to samples/minimal/minimal.cpp that will demonstrate the problem.

···

On 2/4/11 9:36 AM, Mark Weng wrote:

On 2/3/11 9:01 AM, Mark Weng wrote:

I have a text editor script. It works fine in 2.9.1 or before. When
testing in 2.9.2. the history records(menu item) in menu 'File' are all
appended to the end. The normal should be inserted before last 2. That
is, executing menu.Insert(0, ...), the menu item will be the 3rd, not
the 1st.

Platform? Please make a small runnable sample that demonstrates the
problem. MakingSampleApps - wxPyWiki

I use Windows XP 32bit.

In fact, I wrote a sample in c++ code. I got the same 'shift 2' problem in wxWidgets 2.9.2. I also compile it in 2.9.1 and this build did run as expected.

--
Robin Dunn
Software Craftsman