On Mon, Sep 27, 2010 at 21:49, Juanjo Alvarez < juan...@thatwebmailofgoogleproperty.com> wrote:
> >> Curiously if you create holder like this, it will give an > >> arrayoutofbound error at runtime, I don't know if that is a bug: > I think I got this one too. IIRC, it's a bug in the holder["test"] part than the Variant(&c.test) part. > Yep, variants are cool. You could even use an struct as value type of the > associative array and store the variant in one member and the signature > of the delegate, as string, in another member. The you could use a mixin > in the receiver to extract the delegate without knowing the original > signature. > > All this is wonderfully disturbing to me :) > I'm not sure you can. You can only mixin strings known at compile-time. Your string member will only have a value at runtime. Except if the struct is an enum, maybe. Philippe