<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
As you're creating a Gtk app, have you considered using <a
href="http://gtkd.mikewey.eu/src/glib/Timer.html">glib.Timer</a>
or <a href="http://gtkd.mikewey.eu/src/glib/Timeout.html">glib.Timeout</a>
(depending on your needs)? I do almost all my Gtk development in
Vala these days, so I haven't used them from D (so not sure if
you've encountered problems with them).<br>
<br>
Cheers,<br>
<br>
Chris<br>
<br>
<br>
On 07/20/11 10:20, maarten van damme wrote:
<blockquote
cite="mid:CADxhozusJuPT2u6CkNs3-G1WqeLF4+ZvB8dqYmU=pvP+qZNUAg@mail.gmail.com"
type="cite">Thanks a lot, now those errors are gone. Still it
refuses to work properly...
<div>I have a method clockTick in Main.d and that should be called
every 0.1 seconds, when I place a call to that method in a
onmousenotify event(when the mouse moves) It runs correctly
apart from the odd fact I need to move my mouse to play the
game. </div>
<div>When I use that method in the timerclass it reaches only the
lines where I print something in the console but doesn't go any
further without giving any errors. </div>
<div><br>
</div>
<div>The complete code can be seen at:</div>
<div><a moz-do-not-send="true"
href="http://dl.dropbox.com/u/15024434/d/Main.d">http://dl.dropbox.com/u/15024434/d/Main.d</a></div>
<div><a moz-do-not-send="true"
href="http://dl.dropbox.com/u/15024434/d/Timer.d">http://dl.dropbox.com/u/15024434/d/Timer.d</a></div>
<div>
<a moz-do-not-send="true"
href="http://dl.dropbox.com/u/15024434/d/Sprite.d">http://dl.dropbox.com/u/15024434/d/Sprite.d</a></div>
<div><a moz-do-not-send="true"
href="http://dl.dropbox.com/u/15024434/d/Bain.d">http://dl.dropbox.com/u/15024434/d/Bain.d</a></div>
<div><a moz-do-not-send="true"
href="http://dl.dropbox.com/u/15024434/d/PingPongBox.d">http://dl.dropbox.com/u/15024434/d/PingPongBox.d</a></div>
<div><br>
</div>
<div>The code for the timer in Main.d is at line 63</div>
<div>clockTick method in Main.d is at line 93</div>
<div><br>
<div class="gmail_quote">2011/7/20 Daniel Murphy <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:yebblies@nospamgmail.com">yebblies@nospamgmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex;">private
void function() * callBack;<br>
<br>
should be private void function() callBack;<br>
<br>
void function() is a function pointer, void function()* is a
pointer to a<br>
function pointer.<br>
<br>
On lines 23 and 41, you shouldn't be dereferencing callBack.
Just use<br>
callBack() to call the function and 'this.callBack =
callBack' to set it.<br>
<br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
</body>
</html>