have function must pass delegate.

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Nov 13 06:08:00 PST 2014


On Thu, 13 Nov 2014 14:02:22 +0000
Spacen Jasset via Digitalmars-d-learn
<digitalmars-d-learn at puremagic.com> wrote:

> A method call in the GTK API takes a delegate as an 
> argument(addOnActivate) I would like to be able to pass a 
> function instead (address of). What is the solution, at present I 
> have a wrapper class around the function.
std.functional has `toDelegate`.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20141113/2b3f606f/attachment-0001.sig>


More information about the Digitalmars-d-learn mailing list