PDA

View Full Version : Weird ListItem.property problem


nerdynick
June 13th, 2009, 02:45 AM
So I seem to be having what seems to be a very weird angering problem with ListItem.property(). A chunk of code that has been working just fine decided to stop working an a refresh of the window when starting to look into what appeared to be a bug with the Text Control causing Boxee to crash when scrolling down then up with the mouse wheel.

Here is 1 of my Label controls that are not displaying the provided value.

<control type="label">
<posx>10</posx>
<posy>120</posy>
<width>180</width>
<height>20</height>
<font>light18</font>
<label>$INFO[ListItem.property(videoLoc)]</label>
<align>left</align>
<textcolor>green</textcolor>
</control>


I can confirm that when I'm making the listitems in Python in the Window OnLoad event. That the videoLoc property is getting set and does return a value when I call GetProperty().

The weirdest part comes when I have also set description and viewCount using SetDescription() & SetViewCount(), but calling property(description) I get nothing and property(viewCount) returns the correct view count. All 3 calls where working perfectly fine, but decided to break at the same time the Text control started to act up.

I have tested the same set of code on both the Ubuntu box i'm deving it on. As well as my Mac laptop and both return the same result.

nerdynick
June 13th, 2009, 01:03 PM
So after sleeping on it I was able to figure out what all broke with the help of the debug output from the play event.

I would also suggest adding documentation on getting custom properties of ListItems. It lacks in information that you need to call property() to get it as well as custom properties need to be custom:NAME. I could find no reference to this in both the Boxee Docs as well as the XBMC docs.

With all that said it appears their maybe a bug in the TextBox control. Lets say you have the following


<control type="textbox">
<posx>0</posx>
<posy>475</posy>
<width>410</width>
<height>100</height>
<font>light18</font>
<textcolor>white</textcolor>
<align>left</align>
<label>$INFO[Container(100).ListItem.property(description)]</label>
</control>


Now if you use the mouse scroll wheel on this control. Go all the way down to the bottom then go back up to the top. This seems to cause boxee to crash with the only output that I can find being "Segmentation fault" when I run ./Boxee from a Command Prompt.