NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 20 21 22 23 24 … 93 Next »
WizTools - 1.x Plugin Development Toolkit

 
  • 0 Vote(s) - 0 Average
WizTools - 1.x Plugin Development Toolkit
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#161
2008-01-07, 11:12 PM
sub Wrote:Its not clear to me what you are talking about.

Snap! Big Grin

Its because theres a big skills gap its like were speaking different languages..

I have looked on here http://msdn2.microsoft.com/en-us/library...thods.aspx

and there is not a .GetImage method for Image Class.

you have in your example the @thumnail pointing to media.GetImage

hence my questions on what media was defined as.
Let the Games begin...Round 2!
GameZone v2.9.6 - PVRx2 1.4.7 compatible!

[Image: 1299379.png]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#162
2008-01-07, 11:37 PM
Here it is another way:

Code:
Hashtable args = new Hashtable();
args["@ArtistSong"] = media.Artist + "-" + media.Title;
args["@Time"] = currentSong.ToString();
args["@AlbumArt"] = [b]Image.FromFile("c:\\test.jpg");[/b]
nowPlayingStatic.SetArgs(args);

The SkinHelper is expecting the hashtable object to be a System.Drawing.Image.

The 'media' object in that last example was some object used in one of psycik's plugins. He asked about a day before you how to do the same thing, and supplied his hashtable definition. The post I made for you copied/pasted the example I helped him with the day before. Whatever his media object was, it had a GetImage() method that returned an System.Drawing.Image.
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#163
2008-01-07, 11:51 PM
idkpmiller Wrote:Hi Sub,
I just tryed the method you explained, and if I do just text its working fine, it all turns to custard when I use an image so... the media.GetImage you have in your code how is that passing and what is it passint to the args? i.e. is the image itself or a string for the filename, is there something simple I can set up there to test that everything is working?

Thanks

I did have to change text and graphics to get the new graphics to show up. If nothing changes you don't get the getimage callback.
JW had example code that did what you want.
GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#164
2008-01-07, 11:57 PM
worked out what must be happening just prior to receiving your post.

I have tried this, in needsRendering:

Code:
Dim args As New Hashtable()
            args("@Text") = selectedEmulator
            args("@Image") = Image.FromFile("C:\\gamezone.jpg")
            emulatorIconStatic.SetArgs(args)

with skin.xml


Code:
        <Placement name="emulatorIcon" loc="5.0,80.0" />


        <CompositeImage name="emulatorIcon" size="75.0,5.0">
            <DrawText text="@Text" loc="0,0" size="100,100" textStyle="LabelText" align="Left" />
            <DrawImage fileName="@image" loc="0,0" size="100,100" />
        </CompositeImage>

it is now very basic, I am thinking it must be a skin issue, does the skin extract look correct?

As I said its only when the image parts are added does it go wrong.
Let the Games begin...Round 2!
GameZone v2.9.6 - PVRx2 1.4.7 compatible!

[Image: 1299379.png]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#165
2008-01-08, 12:00 AM
That looks about right, but post the logs and I'll take a look.
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#166
2008-01-08, 12:07 AM
Cheers Sub,

line 2561 is the needsRendering line: emulatorIconStatic.SetArgs(args)

here is the logs
Let the Games begin...Round 2!
GameZone v2.9.6 - PVRx2 1.4.7 compatible!

[Image: 1299379.png]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#167
2008-01-08, 12:17 AM
idkpmiller Wrote:line 2561 is the needsRendering line: emulatorIconStatic.SetArgs(args)
Quote:2008-01-08 13:02:55.828 ERROR [1] Unexpected error: System.NullReferenceException: Object reference not set to an instance of an object.
at GameZone.GameZone.GameZoneTask.needsRendering() in H:\GB-PVR\project\GameZone 2\GameZone 2\GameZone 2\GameZoneTask.vb:line 2561
at GBPVRX2.MenuTask.x0be92cb4e3ac1817.needsRendering()
at GBPVRX2.MenuTask.xd2a3a83a17aec615.needsRendering()
at GBPVRX2.x0061b801bdf12d35.xdb012c437aec4a40(Boolean xd23bf32f3b17e3be)
at GBPVRX2.xb979ad394703258e.xfb409e85bd292293(String[] xf18a926310372520)
Given these two bits of info, emulatorIconStatic is set to null when you try to call SetArgs(). The error is occuring on that line, not inside the SetArgs() method, otherwise there would be additional levels in the stacktrace showing UiStatic.SetArgs() etc.
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#168
2008-01-08, 12:46 AM
to ensure emulatorIconStatic is not Null I have changed the code to:


Code:
Dim args As New Hashtable()
            args("@Text") = "Testing"
            args("@Image") = Image.FromFile("C:\\gamezone.jpg")
            emulatorIconStatic.SetArgs(args)

This still gives the same error, is this what you meant when it was set to null that one of the args must be null? or the initialisation code I have in Activate was not setup?

In Activate() I have:

Code:
Dim args As New Hashtable()
                args("@Text") = ""
                args("@Image") = ""
                'args("@AlbumArt") = ""
                emulatorIconStatic = New UiStatic(skinHelper, "emulatorIcon", args)
Let the Games begin...Round 2!
GameZone v2.9.6 - PVRx2 1.4.7 compatible!

[Image: 1299379.png]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#169
2008-01-08, 01:05 AM
idkpmiller Wrote:to ensure emulatorIconStatic is not Null I have changed the code to:


Code:
Dim args As New Hashtable()
            args("@Text") = "Testing"
            args("@Image") = Image.FromFile("C:\\gamezone.jpg")
            emulatorIconStatic.SetArgs(args)

This still gives the same error, is this what you meant when it was set to null that one of the args must be null?
This doesnt ensure emulatorIconStatic is not Null. emulatorIconStatic can still be null.

I think needsRendering() can sometimes be called before Activate(). To accomodate this, change your needsRendering() to have:
Code:
Dim args As New Hashtable()
args("@Text") = "Testing"
args("@Image") = myImage
if (emulatorIconStatic != null)
    emulatorIconStatic.SetArgs(args)
You'll also not want to be doing "Image.FromFile("C:\\gamezone.jpg")" in needs rendering. This would cause gamezone.jpg to be loaded from disk about 20 times a second.
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#170
2008-01-08, 09:18 AM
I am just thinking ahead how are people handling the installation for using the new Wiz DLLs (three of them) on to a users system that only has the older single Wiz DLL?

I am assuming I should be copying the wiz DLL into the plugins/common directory what others should be copied there?

I am also making a plugin/<Plugin name> directory I am assuming that is the current best practise.

Appreciate hearing what others are doing.

Cheers
Let the Games begin...Round 2!
GameZone v2.9.6 - PVRx2 1.4.7 compatible!

[Image: 1299379.png]
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)

Pages (31): « Previous 1 … 15 16 17 18 19 … 31 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 3,106 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,577 2020-11-14, 08:01 PM
Last Post: sub
  Test/Development environment for npvr.db3 scJohn 10 4,614 2020-09-04, 09:14 PM
Last Post: scJohn
  VIdeo playback from plugin mvallevand 5 3,655 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 3,018 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,895 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,340 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 2,035 2013-03-12, 06:48 AM
Last Post: psycik
  Integrated Development Environment (IDE) for plugins osx-addict 5 2,876 2012-10-18, 08:35 PM
Last Post: osx-addict
  Plugin problems with started from the command line mvallevand 11 5,273 2012-08-12, 07:56 PM
Last Post: sub

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

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

Linear Mode
Threaded Mode