How to catch fired events in plugin? (1 Viewer)

geoffstewart

MP Donator
  • Premium Supporter
  • October 12, 2008
    346
    112
    Ottawa
    Home Country
    Canada Canada
    Hi,

    I hope this is the right place for my question.

    I'd like the plugin I'm working with to register to do some work when a new schedule is added. I found that in the TvEngine, that in TVController.cs, there is a method onNewSchedule() that "fires" an event.

    How can I get a plugin to register for that event?

    Also, once registered, is the callback done in a seperate thread in an asynch manner? Or does use the current thread?

    Thanks.

    Geoff

    I think I found it myself... sorry.

    Code:
     ITvServerEvent events = GlobalServiceProvider.Instance.Get<ITvServerEvent>();
     events.OnTvServerEvent += new TvServerEventHandler(events_OnTvServerEvent);
     

    geoffstewart

    MP Donator
  • Premium Supporter
  • October 12, 2008
    346
    112
    Ottawa
    Home Country
    Canada Canada
    I think I still need help... I get the callback, but the eventArgs is basically empty.... I was expecting the Schedule property to be populated.

    Why is it that the TVPlugin doesn't use the signature onNewSchedule(eventArgs)? It seems that the client has the newly created schedule at it's finger tips and just sends the event with no arguments?

    Am I missing something?

    Geoff
     

    geoffstewart

    MP Donator
  • Premium Supporter
  • October 12, 2008
    346
    112
    Ottawa
    Home Country
    Canada Canada
    Another question... i see that scheduledAdded events are fired when a schedule is deleted and when the SetupTV.exe quits....

    Would either of these constitute a bug that should be fixed
     

    Users who are viewing this thread

    Top Bottom