// when this view is removed from the native toolbar its count gets decremented again
// and when the HITooolbarItem wrapper object gets destroyed it is decremented as well
// so in the end the control lives with a refcount of one and can be disposed of by the
// when this view is removed from the native toolbar its count gets decremented again
// and when the HITooolbarItem wrapper object gets destroyed it is decremented as well
// so in the end the control lives with a refcount of one and can be disposed of by the
if( viewRef && IsValidControlHandle( viewRef) )
{
// depending whether the wxControl corresponding to this HIView has already been destroyed or
if( viewRef && IsValidControlHandle( viewRef) )
{
// depending whether the wxControl corresponding to this HIView has already been destroyed or
// find the maximum tool width and height
wxToolBarTool *tool;
wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
// find the maximum tool width and height
wxToolBarTool *tool;
wxToolBarToolsList::compatibility_iterator node = m_tools.GetFirst();
if ( tool2->IsControl() )
{
CFIndex count = CFGetRetainCount( tool2->GetControl()->GetPeer()->GetControlRef() ) ;
if ( tool2->IsControl() )
{
CFIndex count = CFGetRetainCount( tool2->GetControl()->GetPeer()->GetControlRef() ) ;
wxASSERT( IsValidControlHandle(tool2->GetControl()->GetPeer()->GetControlRef() )) ;
}
err = HIToolbarRemoveItemAtIndex(refTB, idx);
wxASSERT( IsValidControlHandle(tool2->GetControl()->GetPeer()->GetControlRef() )) ;
}
err = HIToolbarRemoveItemAtIndex(refTB, idx);
DoToggleTool( tool, true );
wxToolBarToolsList::compatibility_iterator nodePrev = node->GetPrevious();
DoToggleTool( tool, true );
wxToolBarToolsList::compatibility_iterator nodePrev = node->GetPrevious();
{
wxToolBarToolBase *toggleTool = nodePrev->GetData();
if ( (toggleTool == NULL) || !toggleTool->IsButton() || (toggleTool->GetKind() != wxITEM_RADIO) )
{
wxToolBarToolBase *toggleTool = nodePrev->GetData();
if ( (toggleTool == NULL) || !toggleTool->IsButton() || (toggleTool->GetKind() != wxITEM_RADIO) )
- wxString errMsg = wxString::Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long)err );
- wxFAIL_MSG( errMsg.c_str() );
+ wxFAIL_MSG( wxString::Format( wxT("wxToolBar::DoInsertTool - failure [%ld]"), (long)err ) );