NON-GUI plugin problem in MediaPortal interface - VB.NET (1 Viewer)

A

Anonymous

Guest
Frodo

There is a problem with the implementation of NON-GUI plugins. If you want to write a plug-in using VB.NET (as I was just starting), the "Stop" interface is a bit of a problem ...

Public Sub Stop() Implements Mediaportal.GUI.Library.IPlugin.Stop
Microsoft.VisualBasic.Interaction.MsgBox("Ben's plugin stopped.")
End Sub

Stop is a keyword in vb.net and the compiler throws an exception ("Keyword is not valid as an identifier"). Ends up that you can't implement the stop interface, which is required, and therefore can't write a plugin :(

Can we change it to "Finish" or "Cleanup"? Perhaps even make it optional?

Ben

BTW - you guys do great work.
 

samuel337

Portal Pro
August 25, 2004
772
0
Melbourne, Australia
Try enclosing the Stop word in square brackets, like this [Stop] , whenever you don't want VB.NET to recognise it as a keyword.

So try this:
Public Sub [Stop]() Implements Mediaportal.GUI.Library.IPlugin.Stop
Microsoft.VisualBasic.Interaction.MsgBox("Ben's plugin stopped.")
End Sub

HTH

Sam
 

Users who are viewing this thread

Top Bottom