Creating dotnet objects with events

Cem_KaraerCem_Karaer Member Posts: 281
edited 2011-11-21 in NAV Tips & Tricks
Hello,

I create a simple .NET class to simulate phone calls. I would use this class as an dotnet variable to catch some events from it. But it is impossible to create dotnet variable with events. So I decided to build the dll with registering for COM interop, also made the assembly COM-visible.

I am now enable to declare my class as automation variable. But when I set withevents property of the variable to yes, I can not see any additional function as an event handler.

I am sure that I miss something but I don't know what :)
Cem Karaer @ Pargesoft
Dynamics NAV Developer since 2005

Comments

  • krikikriki Member, Moderator Posts: 9,112
    As far as I remember, it is not supported yet.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Cem_KaraerCem_Karaer Member Posts: 281
    Thank you kriki!

    So I must create the COM class with classic methods?
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • krikikriki Member, Moderator Posts: 9,112
    If you want events, yes.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Cem_KaraerCem_Karaer Member Posts: 281
    Cem Karaer @ Pargesoft
    Dynamics NAV Developer since 2005
  • krikikriki Member, Moderator Posts: 9,112
    Very interesting link!

    [Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Tips & Tricks' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.