MediaPortal Forums HTPC/MediaCenter

Go Back   MediaPortal Forum » MediaPortal 1 » Community Skins and Plugins » Plugins


Plugins Plugins developed and maintained by users. Want to create your own plugin? Start a thread in here.

Reply
 
Thread Tools Display Modes
Old 2004-10-27, 14:38   #1 (permalink)
Anonymous
Guest
 
Posts: n/a


Default NON-GUI plugin problem in MediaPortal interface - VB.NET

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.
  Reply With Quote
Old 2004-10-27, 16:42   #2 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 773
Thanks: 0
Thanked 0 Times in 0 Posts


Default

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
samuel337 is offline   Reply With Quote
Old 2004-10-28, 13:22   #3 (permalink)
Anonymous
Guest
 
Posts: n/a


Default

Cool - works fine.

I hadn't come across that before.

Thanks.
  Reply With Quote
Old 2004-10-28, 13:29   #4 (permalink)
Portal Member
 
Join Date: Aug 2004
Location: Melbourne, Australia
Posts: 773
Thanks: 0
Thanked 0 Times in 0 Posts


Default

no problem, mate.

I only discovered that a while ago working on another project...pretty hidden feature I reckon in VB.NET.

Sam
samuel337 is offline   Reply With Quote
Reply

Bookmarks

Tags
interface, nongui, plugin, vbnet

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone else having a problem with the Zap2It plugin? inXorable General Talk 6 2007-01-21 03:41
mediaportal crash after tv setup in settings/setup wizard zimmerkid Codecs, External Players 1 2007-01-18 06:17
Problem with tv-engine mediaportal plugin youngpro Get Support 3 2007-01-05 23:47
Problem with AvertMedia USB and MediaPortal 86jacob General Support 0 2006-09-23 08:38
Plugin interface Anonymous Plugins 13 2004-09-15 18:25


All times are GMT +1. The time now is 05:10.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 Protected by Akismet Blog with WordPress
Advertisement System V2.6 By   Branden