18 lines
3 KiB
Text
18 lines
3 KiB
Text
version=pmwiki-1.0.5
|
|
newline=²
|
|
text=[[include:Code/CodeHintsInc#TopBar#TopBarEnd]]²!! How to use a loop [--For you might want to make an IRC client :)--]²I had trouble finding this out, so here it is. If you want to manage a network connection (i.e. an IRC connection) you need a %code%while (1) {}%% loop. This cannot be done in PHP-GTK, because of the %code%gtk::main()%% function. ²So, there is the %code%gtk::timeout_add($time, $function)%% that executes a function every {{$time}{ milliseconds. This solves our problem.²²!!!!%color=red%Important²Your function must return TRUE; else it will not be called again. Return FALSE to cancel the timeout.²[[include:Code/CodeHintsInc#BottomBar#BottomBarEnd]]
|
|
time=1090875607
|
|
diff:1090778055:1090778055:=1,7c1²< [[include:CodeHintsNav]]²< !! How to use a loop [--For you might want to make an IRC client :)--]²< I had trouble finding this out, so here it is. If you want to manage a network connection (i.e. an IRC connection) you need a %codelines%while (1) {}%% loop. This cannot be done in PHP-GTK, because of the %codelines%gtk::main()%% function. ²< So, there is the %codelines%gtk::timeout_add($time, $function)%% that executes a function every {{$time}{ milliseconds. This solves our problem.²< ²< !!!!%color=red%Important²< Your function must return TRUE; else it will not be called again. Return FALSE to cancel the timeout.²\ No newline at end of file²---²> Describe {{Loop}} here.²\ No newline at end of file²
|
|
author=nathan
|
|
author:1090778055=nathan
|
|
host:1090778055=82.124.244.245
|
|
name=Code.Loop
|
|
host=82.120.149.253
|
|
agent=Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Firefox/0.8 StumbleUpon/1.908
|
|
rev=3
|
|
diff:1090874838:1090778055:minor=1c1²< [[include:Code/CodeHintsInc#TopBar#TopBarEnd]]²---²> [[include:CodeHintsNav]]²7,8c7²< Your function must return TRUE; else it will not be called again. Return FALSE to cancel the timeout.²< [[include:Code/CodeHintsInc#BottomBar#BottomBarEnd]]²\ No newline at end of file²---²> Your function must return TRUE; else it will not be called again. Return FALSE to cancel the timeout.²\ No newline at end of file²
|
|
author:1090874838=nathan
|
|
host:1090874838=82.120.149.253
|
|
diff:1090875607:1090874838:minor=3,4c3,4²< I had trouble finding this out, so here it is. If you want to manage a network connection (i.e. an IRC connection) you need a %code%while (1) {}%% loop. This cannot be done in PHP-GTK, because of the %code%gtk::main()%% function. ²< So, there is the %code%gtk::timeout_add($time, $function)%% that executes a function every {{$time}{ milliseconds. This solves our problem.²---²> I had trouble finding this out, so here it is. If you want to manage a network connection (i.e. an IRC connection) you need a %codelines%while (1) {}%% loop. This cannot be done in PHP-GTK, because of the %codelines%gtk::main()%% function. ²> So, there is the %codelines%gtk::timeout_add($time, $function)%% that executes a function every {{$time}{ milliseconds. This solves our problem.²
|
|
author:1090875607=nathan
|
|
host:1090875607=82.120.149.253
|