problems with own EditItem (cMenuEditIpNumItem)

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

 



Markus Hahn wrote:
> Hi there, 
> I have derived my own class cMenuEditIpNumItem  from cMenuEditItem. 
> It displays 4 segments, seperated by dots. 
> 
> My Problem is _SOMETIMES_ if kOk is pressed,  the item  remains in insert mode. 
> If so, pressing  kLeft, kRight release this behaviour.  
> ...
>      case kOk:
> 			//if (pos < 1 ) 
> 			  //return cMenuEditItem::ProcessKey(kNone); 
> 	        pos = 0; 
> 			digit = 0;
> 			return cMenuEditItem::ProcessKey(kNone); 
> 		    //break;	
> 
>      default: 
> 			return cMenuEditItem::ProcessKey(kNone); 
>   }
> 
>   Set();
>   return  osContinue;
> 
> }

You may want to try calling Set() after the modifications in
'case kOk', as in:

      case kOk:
           //if (pos < 1 )
                //return cMenuEditItem::ProcessKey(kNone);
           pos = 0;
           digit = 0;
           Set(); // <<<<<<<<<========== add this line
           return cMenuEditItem::ProcessKey(kNone);
           //break;

      default:
           return cMenuEditItem::ProcessKey(kNone);
   }

   Set();
   return  osContinue;
}

(original code re-indented for readability ;-).

Klaus


[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux