GetMenuItemRefCon( command.menu.menuRef , command.menu.menuItemIndex , &refCon ) ;
itemMenu = wxFindMenuFromMacMenu( command.menu.menuRef ) ;
if ( itemMenu != NULL && refCon != 0)
- item = ((wxMenuItemImpl*) refCon)->GetWXPeer() ;
+ item = (wxMenuItem*) refCon;
}
}
#endif
{
m_parentMenuRef = parentMenuRef;
if ( m_parentMenuRef && index > 0 )
- SetMenuItemRefCon( m_parentMenuRef, index, (URefCon) this );
+ SetMenuItemRefCon( m_parentMenuRef, index, (URefCon) m_peer );
}
MenuItemIndex FindMenuItemIndex()
{
URefCon storedRef = 0;
GetMenuItemRefCon(m_parentMenuRef, i, &storedRef );
- if ( storedRef == (URefCon) this )
+ if ( storedRef == (URefCon) m_peer )
{
hit = i;
break;