NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 78 79 80 81 82 … 93 Next »
JasonF

 
  • 0 Vote(s) - 0 Average
JasonF
darrin75
Offline

Senior Member

Posts: 558
Threads: 103
Joined: Nov 2004
#1
2005-01-21, 11:14 AM
jasonf,


Can you take a look at my helloworldPlugin, and tell me what if anything i am missing..Attached I am using sharpdevelop
jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#2
2005-01-21, 12:50 PM
The first obvious thing missing is the closing curly bracket for the namespace block (i.e., add a single "}" to the bottom).

Next, the render method is missing it's parameter.  If there's a parameter in the interface declaration, then there must be one when a class implements that interface.

The method signature needs to read:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">        public virtual System.Drawing.Image render(out requiresMoreRendering)
[/QUOTE]

Same thing for the mouse handlers (missing parameters).  These methods should read:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">        public virtual void OnClick(Point point)
       {


       }

       public virtual void OnDoubleClick(Point point)
       {


       }


       public void OnMouseWheel(System.Windows.Forms.MouseEventArgs eventArgs)
       {

       }[/QUOTE]

Next, if a method is declared as anything but void, then you need to return a value, even in stub code.  So, I added return values to these methods:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">        public virtual System.Drawing.Image getTaskImage()
       {
     return null;
       }

        public bool OnKeyDown(System.Windows.Forms.KeyEventArgs e)
       {
       return false;
       }
[/QUOTE]

(Notice also that OnKeyDown in your code was missing the required parameter KeyEventArgs)

And finally, you were missing a stub for this method:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">        public System.Windows.Forms.Form GetConfigFormInstance(XmlDocument document)
       {
           // TODO:  Add HelloWorldTask.GetConfigFormInstance implementation
           return null;
       }[/QUOTE]
JasonF
jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#3
2005-01-21, 12:52 PM
And here's how it looks when compiled and copied into the GBPVR plugin directory
JasonF
darrin75
Offline

Senior Member

Posts: 558
Threads: 103
Joined: Nov 2004
#4
2005-01-21, 08:29 PM
That helped alot, although in sharpdevelop i am still getting 1 error. Although i am having problems with sharp develop task list view. So i will get back to you when i figure it out..
darrin75
Offline

Senior Member

Posts: 558
Threads: 103
Joined: Nov 2004
#5
2005-01-21, 08:33 PM
thanks all i want for now is just a base to go off of, So i don't have to write the same thing over and over
darrin75
Offline

Senior Member

Posts: 558
Threads: 103
Joined: Nov 2004
#6
2005-01-21, 08:42 PM
By the way what are you using visual studio 6.0, do you know where i can get this perhaps ebay...Exactly what do i look for in what version..
jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#7
2005-01-22, 01:40 AM
No, not visual studio 6.0. That product was before .NET came out.

You'll want to look for Visual Studio.NET 2003 if you want to match what I wrote the tutorial for.
JasonF
jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#8
2005-01-22, 02:26 AM
I pulled out Sharp Develop (v1.0.3) again to take a look at it. It does indeed have a code completion feature that would be most useful for generating your code stub.

After implementing an interface, position the cursor within the class's code block, and then press ALT+Insert. The code completion window will appear. Select Implement Interfaces, and then check the interface that you want to implement. Press Enter, and SharpDevelop will write the code for you.

I noticed, though, that it didn't catch the &quot;out&quot; parameter of the render() method (it wrote the stub as a &quot;ref&quotWink. To correct this, just change &quot;ref&quot; to &quot;out&quot;, and then be sure to set the variable to &quot;false&quot; inside of the method.
JasonF
darrin75
Offline

Senior Member

Posts: 558
Threads: 103
Joined: Nov 2004
#9
2005-01-22, 02:43 AM
Awesome you are the man.. thank you so much, i did not know how to do this with sharpdevelop, i am sure things will go alot smoother when i get home to try it.. Thanks he he he he
darrin75
Offline

Senior Member

Posts: 558
Threads: 103
Joined: Nov 2004
#10
2005-01-22, 07:56 AM
Can you send me your helloworld.cs from sharp develop.. My sharp is throwing exceptions, i don't know what the ####...
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode