NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 36 37 38 39 40 … 93 Next »
UIStatic issue

 
  • 0 Vote(s) - 0 Average
UIStatic issue
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#1
2008-01-08, 08:53 AM
Hi Sub,

I figured its best to move the issue I am having with UIStatic to its own thread.

I have tried so many different things as you are aware but still get the null reference issue. I have code that now works fine with all the image stuff in there as long as I remove the @Image composite statement from the skin, as soon as the @image statement is reinstated I get the error shown below.


Code in Activate() I have shown all the code so that you can see where the log messages are within the code.


Code:
Public Sub Activate() Implements IMenuTask.Activate Logger.Verbose(Me.getName() + ": Activate()") If Not initialized Then skinHelper = New SkinHelper2(mSkinDirectory + "\skin.xml") If skinHelper.checkCompositeImageDefined("ScreenName") Then Logger.Verbose("GameZone: ScreenName Composite image is defined") Dim parameters As New Hashtable() parameters("@screenName") = Me.getName() Me.screenNameElement = New GBPVR.Public.GBPVRUiElement("ScreenName", skinHelper.getPlacementRect("ScreenName"), skinHelper.getNamedImage("ScreenName", parameters)) Else MsgBox("GameZone: ScreenName Composite image missing") End If NoOFFilesLabel = New WizUiLabel(skinHelper, "NoOFFilesLabel", "You Should never see this text", "NoOFFilesLabelImage") ctlMgr.AddControl(NoOFFilesLabel) Logger.Verbose("GameZone: control added = NoOFFilesLabel") NoOFPagesFilesLabel = New WizUiLabel(skinHelper, "NoOFPagesFilesLabel", "You Should never see this text", "NoOFPagesFilesLabelImage") ctlMgr.AddControl(NoOFPagesFilesLabel) Logger.Verbose("GameZone: control added = NoOFPagesFilesLabel") Dim args As New Hashtable() args("@Text") = "Activate" args("@Image") = Image.FromFile("c:\\gamezone.jpg") If skinHelper.checkCompositeImageDefined("emulatorIcon") Then Logger.Verbose("about to define emulatorIconStatic in activate") emulatorIconStatic = New UiStatic(skinHelper, "emulatorIcon", args) End If Logger.Verbose("GameZone: Never gets here with @Image in the skin.xml file") main = True InitFileList() If emulatorimage IsNot Nothing Then Logger.Verbose("GameZone: emulatorimage is set") End If Dim captions As String() = DirectCast(menuButtons.ToArray(GetType(String)), String()) cmdButtonList = New WizUiButtonList(skinHelper, "ButtonList", captions) ctlMgr.AddControl(cmdButtonList) lstMyList1 = New WizUiList(skinHelper, "ListBox1", Me, Nothing) lstMyList1.AllowMultipleSelections = False lstMyList1.AutoPosition = True ctlMgr.AddControl(lstMyList1) clsGlobal.AppLaunched = False Logger.Verbose("GameZone: Exiting Activate") initialized = True End If setPopup(Nothing) ctlMgr.setFocus(cmdButtonList) Logger.Verbose(Me.getName() + ": Activate() complete.") End Sub

Here is the logfile from the run where the @Image line insitu:

Code:
2008-01-08 19:02:35.625 VERBOSE [1] GameZone: Activate() 2008-01-08 19:02:35.625 VERBOSE [1] GameZone: ScreenName Composite image is defined 2008-01-08 19:02:35.640 VERBOSE [1] GameZone: control added = NoOFFilesLabel 2008-01-08 19:02:35.640 VERBOSE [1] GameZone: control added = NoOFPagesFilesLabel 2008-01-08 19:02:35.640 VERBOSE [1] about to define emulatorIconStatic in activate 2008-01-08 19:02:35.750 VERBOSE [1] ReturnToMainMenu() 2008-01-08 19:02:35.750 VERBOSE [1] GameZone is currently active 2008-01-08 19:02:35.750 VERBOSE [1] GameZone.Deactivate() called 2008-01-08 19:02:35.750 VERBOSE [1] GameZone: Deactivated 2008-01-08 19:02:35.750 VERBOSE [1] GameZone: Exited Deactivated 2008-01-08 19:02:35.750 VERBOSE [1] GameZone:needsrendering: Not trying emulatorIconStatic this time around 2008-01-08 19:02:35.750 VERBOSE [1] GameZone: Exiting needsRendering routine 2008-01-08 19:02:35.750 VERBOSE [1] GameZone: Entering GetRenderList routine 2008-01-08 19:02:35.765 VERBOSE [1] ReturnToMainMenu()@2 2008-01-08 19:02:35.765 VERBOSE [1] System.NullReferenceException: Object reference not set to an instance of an object. at GBPVRX2.SkinHelper2.getNamedImage(Image image, String name, Hashtable parameters, XmlNode fromNode) at GBPVRX2.SkinHelper2.getNamedImage(String name, Hashtable parameters) at GBPVRX2.UiSupport.UiStatic..ctor(SkinHelper2 skinHelper, String compositeImageName, Hashtable args) at GameZone.GameZone.GameZoneTask.Activate() in H:\GB-PVR\project\GameZone 2\GameZone 2\GameZone 2\GameZoneTask.vb:line 1123 at GBPVRX2.MenuTask.xd2a3a83a17aec615.OnKeyDown(KeyEventArgs e) at GBPVRX2.x0061b801bdf12d35.xdae9991ab918b397(Object xdf2e3583f942db7b, KeyEventArgs xc4f45905cb1fc7ba) at System.Windows.Forms.Control.OnKeyDown(KeyEventArgs e) at System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m) at System.Windows.Forms.Control.ProcessKeyMessage(Message& m) at System.Windows.Forms.Control.WmKeyChar(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ScrollableControl.WndProc(Message& m) at System.Windows.Forms.ContainerControl.WndProc(Message& m) at System.Windows.Forms.Form.WndProc(Message& m) at GBPVRX2.x0061b801bdf12d35.WndProc(Message& m) 2008-01-08 19:02:35.765 VERBOSE [1] GameZone:needsrendering: Not trying emulatorIconStatic this time around 2008-01-08 19:02:35.765 VERBOSE [1] GameZone: Exiting needsRendering routine 2008-01-08 19:02:35.765 VERBOSE [1] GameZone: Entering GetRenderList routine


The log file below shows that it never gets to:

Code:
Logger.Verbose("GameZone: Never gets here with @Image in the skin.xml file")

Any more ideas on what to try, I have checks on the Getrenderlist and needsRendering routines to make sure that emulatorIconStatic is not null.

I have tried:

Code:
Dim args As New Hashtable() args("@Text") = "" args("@Image") = ""



Code:
Dim args As New Hashtable() args("@Text") = Nothing args("@Image") = Nothing

All give the same issue...

Any more thoughts?

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

[Image: 1299379.png]
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#2
2008-01-08, 09:35 AM
Can you post that section of your skin.xml? It looks like its returning a null value when pulling that section. I could be wrong though, it IS 4:30am.
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#3
2008-01-08, 09:51 AM
As requested the sections of the skin.axl are:

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

and

Code:
<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>

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

[Image: 1299379.png]
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#4
2008-01-08, 10:33 AM
idkpmiller Wrote:<DrawImage fileName="@Image" loc="0,0" size="100,100" />
In the first skin I looked at (blue\InternationalCinemaListings\FilmInfoPopup.xml) it has filename="@Image" with a lower case 'n' - might be significant?
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#5
2008-01-08, 10:47 AM (This post was last modified: 2008-01-08, 10:53 AM by idkpmiller.)
I have actually tried lower case. But not in the application and the skin at the same time, BRB

Nope, no difference Sad

I am starting to wonder if its a clash with Subs UI and Wiz UI, can someone with c# put subs code in to one of the Wiz demo plugins and see if it works?

[EDIT] I misread your post when I went off to try it I was thinking about the "I" in image and not the "N" in name, just to let you know what I have already told you.

[SIZE="5"]You are a [COLOR="Red"][SIZE="7"]STAR[/SIZE].[/SIZE][/COLOR]

It worked lowercase [SIZE="5"]N[/SIZE]
Let the Games begin...Round 2!
GameZone v2.9.6 - PVRx2 1.4.7 compatible!

[Image: 1299379.png]
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#6
2008-01-08, 12:58 PM
lol. no problems Smile
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 108,494
Threads: 784
Joined: Nov 2003
#7
2008-01-08, 03:26 PM
lol Big Grin

Good spotting McBain.
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#8
2008-01-08, 03:48 PM
It comes easy with my (harshly learnt) skin-debugging skills. Big Grin
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#9
2008-01-08, 05:01 PM
Yup. Good catch.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  UiStatic vs UiElement? imilne 8 4,717 2012-12-24, 02:31 PM
Last Post: imilne
  Problem using UIStatic philcooling 13 6,225 2010-02-12, 06:34 PM
Last Post: whurlston
  Drawing UiStatic mvallevand 4 3,256 2009-09-02, 10:06 PM
Last Post: mvallevand
  WizUIhelper 1.0.15.4 issue idkpmiller 9 4,705 2008-04-03, 02:04 AM
Last Post: JavaWiz
  UIStatic update idkpmiller 3 2,667 2008-01-10, 02:35 AM
Last Post: idkpmiller
  Save a UiStatic out as a jpg McBainUK 4 2,685 2007-11-16, 03:23 PM
Last Post: McBainUK
  Keymapping issue idkpmiller 7 3,461 2007-01-07, 03:15 PM
Last Post: sub
  onkeydown = play, pluginHelper.IsPlaylistPaused() issue reven 2 2,459 2006-07-04, 09:28 PM
Last Post: reven
  PLAY>PAUSE>STOP>PLAY issue reven 2 2,221 2006-01-20, 04:57 AM
Last Post: reven
  CDK Scheduler issue with Quotes ZaDDaZ 13 5,819 2005-04-11, 01:38 AM
Last Post: KingArgyle

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

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

Linear Mode
Threaded Mode