Re: Why check menu item's response was blocked?



On Wed, Aug 11, 2004 at 07:06:35PM +0800, jacky618 jacky618 wrote:
>    printf("***");
> 
>    if (GTK_CHECK_MENU_ITEM(ckMnItem)->active == TRUE)
>        printf("###");
>    else
>        printf("@@@@");
>
> ...
> 
> I hope when the check menu item was selected, it will print  "***###" 
> immediately,and "***@@@" when unselected. However, it can not print 
> immediately after the menu item was clicked.And until the main window was 
> closed, the strings will appear. 

This has nothing to do with Gtk+.

Standard output is line-buffered by default.  Either change
it (setvbuf(3)) or, much better, print whole lines ended
with "\n".

Yeti


--
Do not use tab characters. Their effect is not predictable.



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