comparison mde/util.d @ 95:2a364c7d82c9

Boolean options can be adjusted from the gui now (using a very basic widget). Also some bug-fixes. Fixed a minor bug where layouts with the same id but without shared alignments would be messed up. Tracked down the "nothing trawn until a resize" bug (see jobs.txt). If widgets throw during creation they're now replaced by debug widgets. Function pointers are converted to delegates using a safer method.
author Diggory Hardy <diggory.hardy@gmail.com>
date Thu, 06 Nov 2008 11:07:18 +0000
parents
children
comparison
equal deleted inserted replaced
94:9520cc0448e5 95:2a364c7d82c9
1 module mde.util;
2
3 /// Not my code: http://www.dsource.org/projects/tango/ticket/1174#comment:7
4 R delegate(T) toDg(R, T...)(R function(T) fp) {
5 if (!fp) return null;
6 struct dg {
7 R opCall(T t) {
8 return (cast(R function(T)) this) (t);
9 }
10 }
11 R delegate(T) t;
12 t.ptr = fp;
13 t.funcptr = &dg.opCall;
14 return t;
15 }