私はこの機能を持っています
private ulong Html(ubyte[] data)
{
return data.length;
}
toDelegate()
関数を使用してデリゲートに変換したい。私はそれを試しました:
client.onReceive = toDelegate(&Html);
しかし、エラーメッセージが表示されます:
lixo.d(722): Error: not a property client.onReceive
/home/$/D/libs/arsd/dom.d(743): Warning: statement is not reachable
/usr/include/d/dmd/phobos/std/range.d(595): Error: static assert "Cannot put a dchar[] into a Appender!(char[])"
/usr/include/d/dmd/phobos/std/format.d(1758): instantiated from here: put!(Appender!(char[]),dchar[])
/usr/include/d/dmd/phobos/std/format.d(1514): instantiated from here: formatRange!(Appender!(char[]),dchar[],char)
/usr/include/d/dmd/phobos/std/conv.d(101): instantiated from here: formatValue!(Appender!(char[]),dchar[],char)
/usr/include/d/dmd/phobos/std/conv.d(757): ... (1 instantiations, -v to show) ...
/usr/include/d/dmd/phobos/std/conv.d(244): instantiated from here: toImpl!(char[],dchar[])
/home/$/libs/arsd/dom.d(2115): instantiated from here: to!(dchar[])
これを修正する方法は?