InsertTool no longer works

Hello All,

I've just upgraded to Python 2.2.2 and wxPython 2.3.3.1 and I'm getting an error message when I call wxToolBar method InsertTool(). This used to work with 2.3.2.1!

The traceback says the following:
AttributeError: wxToolBarPtr instance has no attribute 'DoInsertTool'.

The line in my code is the following:
self.tb.InsertTool(1, ID_BUTTON_STOP, stopImg, shortHelpString="Stop")

Anyone have any ideas how to get it working again?

BTW, not being to Search the Archives any more is a step back in my opinion. I always found that to be very helpful.

Bob

I've just upgraded to Python 2.2.2 and wxPython 2.3.3.1 and I'm getting an
error message when I call wxToolBar method InsertTool(). This used to work
with 2.3.2.1!

The traceback says the following:
AttributeError: wxToolBarPtr instance has no attribute 'DoInsertTool'.

The line in my code is the following:
self.tb.InsertTool(1, ID_BUTTON_STOP, stopImg, shortHelpString="Stop")

Anyone have any ideas how to get it working again?

Hmm, I just got bitten by this too...

Anyone know what the story is with this? Robin?

Stephen.

···

--
Stephen M. Gava <elguavas@python.net>

Stephen M. Gava wrote:

I've just upgraded to Python 2.2.2 and wxPython 2.3.3.1 and I'm getting an error message when I call wxToolBar method InsertTool(). This used to work with 2.3.2.1!

The traceback says the following:
AttributeError: wxToolBarPtr instance has no attribute 'DoInsertTool'.

The line in my code is the following:
self.tb.InsertTool(1, ID_BUTTON_STOP, stopImg, shortHelpString="Stop")

Anyone have any ideas how to get it working again?

Hmm, I just got bitten by this too...

Anyone know what the story is with this? Robin?

Cut-n-Paste error.

Hmm... I answered the email earlier, but it isn't in the archive so I guess it got lost...

If you go into wxPython/stattool.py you'll notice that the wxToolbarBasePtr class has two InsertTool methods. You can change the name of the first one to DoInsertTool and it should work again.

I'll check in real fixes soon.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Thanks! That did the trick.
Bob

···

At 12:43 AM 11/15/2002 -0800, you wrote:

Stephen M. Gava wrote:

I've just upgraded to Python 2.2.2 and wxPython 2.3.3.1 and I'm getting an error message when I call wxToolBar method InsertTool(). This used to work with 2.3.2.1!

The traceback says the following:
AttributeError: wxToolBarPtr instance has no attribute 'DoInsertTool'.

The line in my code is the following:
self.tb.InsertTool(1, ID_BUTTON_STOP, stopImg, shortHelpString="Stop")

Anyone have any ideas how to get it working again?

Hmm, I just got bitten by this too...
Anyone know what the story is with this? Robin?

Cut-n-Paste error.

Hmm... I answered the email earlier, but it isn't in the archive so I guess it got lost...

If you go into wxPython/stattool.py you'll notice that the wxToolbarBasePtr class has two InsertTool methods. You can change the name of the first one to DoInsertTool and it should work again.

I'll check in real fixes soon.