Re: [gtkmm] Question to removal of MenuItems



Andreas,

On Thu, Feb 12, 2004 at 02:59:54PM +0100, Andreas B. Thun wrote:
> Thx, Diana for your posting.
> I still havenīt found a way to remove an item
> from MenuList:
> 
> void TopMenuBar::removeDataBaseMenu(const int& itemNr)
> {
>   MenuList& ml = m_dataBase_menu->items();
> 
>   int i = 0;
>   MenuList::iterator itr_ml;
>   for (itr_ml = ml.begin(); itr_ml != ml.end(); ++itr_ml) {
> 	if (i == itemNr)
> 	  *itr_ml.remove(); // there is no remove or erase. How can I remove 
      ^^^^^^^^^^^^^^^^

Wouldn't that rather be ml.erase (itr_ml);?


> 	  the item?
> 	i++;
>   }
> 
>   glTabCnt--;
> 
> } // removeDataBaseMenu()
> 

-- 
______________________________________________________
Vladislav Grinchenko    e-mail (w): vgrinche integ com
Software Engineer            (h): 3rdshift comcast net
Integral Systems, Inc.

   Focus on quality, and productivity will follow.
______________________________________________________



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]