How to dispatch a class function for an object accessed by handle?
Steven Schveighoffer
schveiguy at gmail.com
Fri Mar 6 14:05:55 UTC 2020
On 3/6/20 8:55 AM, Steven Schveighoffer wrote:
> Instantiate!(f.opDispatch!fname, Bitmap)("path/to/wallpaper.png")
I realized, this doesn't work. Because f.opDispatch is a `this` call,
but is not called that way in this case.
Adam's way doesn't work either, because the call doesn't use the alias,
but just instantiates opDispatch with the new name!
I think the only solution might be the mixin.
-Steve
More information about the Digitalmars-d-learn
mailing list