Function Request: ExposeEvents and Handles

Did you add this to the code in Cirrus? - Because I do not think it was in my last code.

I think the code you posted last was more incomplete than that. Can you send the full thing?

It was complete, except for the value constructor.
Handles.zip (2.4 KB)

that one doesn’t have the constructor either. Nor does it do tostring if it’s a value (as string will fail)

oops wrong version.
Handles(1).zip (2.4 KB)

Should be fixed.

Carlo,

I found several bugs in the code, by Example, the Handles could be processed before the ExposeEvents.
As far as I can see, I fixed them all, except for one.

The call:
Meth := Typ.GetMethods(“set_” + VarName).FirstOrDefault

Does not return anything when the class is a static class or when the ExposeEvents variable is a static variable (making the generated property a static property).

Looks like a bug in IType.GetMethods. Same for IType.GetFields.

Isn’t there a getstaticmethods API? And same for field.

Yes there are :smile:
Didn’t see them before.

It works now in all cases I can (now) think of.
New code:
Handles (2).zip (2.5 KB)

Thanks. In.

Works :smile:
One point: I have to use [ExposeEvents.ExposeEvents] and [ExposeEvents.Handles(…)] instead of [ExposeEvents] and [Handles(…)]
Can you fix that?

Thanks, logged as bugs://80796

bugs://80796 got closed with status fixed.

1 Like

Fix confirmed

1 Like