# from Skaman Sam Tyler
# on Saturday 21 June 2008 20:51:
>5 my $item=$tb->FindById($id); #works.
>6 $item=$tb->FindControl($id); #DOES NOT WORK! returns undef
IIUC, a "control" is not a "tool", so one of these two will always
return undef for any given id.
>"Can't locate object method "SetToolNormalBitmap" via package
>"Wx::ToolBar" at..."
>Is SetToolNormalBitmap() not implemented?
I see it in the source of XS/ToolBar.xs, but with this condition:
#if WXPERL_W_VERSION_GE( 2, 9, 0 )
I think perhaps that's supposed to be (2, 8, 2), since 2.9 doesn't exist
yet.
So, unless you built in the future, it is not implemented in your
binary. You can try changing the if and recompiling.
It looks like the old way was to RemoveTool and InsertTool, but
presumably that makes it hard to reference the tool by anything other
than ID.
--Eric
--
Minus 1 million points for not setting your clock forward and trying the
code.
--Michael Schwern
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------