From: Michael R. <re...@eu...> - 2004-02-01 17:53:16
|
Hi Xavier, Hi List, Hi martin, >>>I tried to implement visibility attribute for icons (and then other >>>widgets), but there's a problem that I spoted on your code : >>>speed attribute on icons can't contain a real expression, just numbers. >>>I fact if I put "speed 150-cpu('busy', 500)" it does draw the icon with >>>a speed depending on the cpu usage, but other widgets don't show. Xavier, for the good news: I found the bug you're talking about. You were right, as soon as you use certain functions in an expression, no more other widgets will be processed. It took me hours to find that bug. Now that I found it, I hardly want to talk about it, because a few days ago I had a discussion with Martin about using a certain C function or better not using it. Well, in short: Martin, you won. It was strtok(). F*CK! F*UCK! F*UCK! F*UCK! F*UCK! F*UCK! F*UCK! F*UCK! F*UCK! F*UCK! The widget list is processed using strtok. The cpu() function uses strtok. This second strtok interferes with the first one. Shit! Having a look at strtok_r.... bye, Michael -- Michael Reinelt Tel: +43 676 3079941 Geisslergasse 4 Fax: +43 316 692343 A-8045 Graz, Austria e-mail: re...@eu... |