[nem-en] Re: += Macro and delegates
Andrey Khropov
andrey.khropov at gmail.com
Fri Dec 8 20:36:46 CET 2006
Kamil Skalski wrote:
> I thought you are transforming TExpr into CodeDom tree? Why do you
> need to generate TExprs from those expressions?
Yes. But in TExpr.MacroEnvelope original is PExpr. I can't use expanded because
Form designer doesn't understand what it does:
----------------------------------------------------------------
mutable _N_cached_obj4611 = this.button1;
_N_cached_obj4611.add_Click(System.EventHandler(this.button1_Click));
----------------------------------------------------------------
It needs CodeDom.CodeAttachEventStatement. That's why I need to somehow create
typed e and method from their PExpr representations:
-------------------------------------
match (original) {
| <[ $e += $method ]> =>
CreateCodeAttachEventStatement(e,method)
}
...
CreateCodeAttachEventStatement(e:PExpr, method:PExpr) : CodeAttachEventStatement
{
?
}
-------------------------------------
More information about the devel-en
mailing list