HZGN.COM
welcome to my space
X
Search:  
Welcome to:hzgn.com
Feng Shui | Graphic Design | Cosmetics | Causes and Organizations | Regulatory Compliance | Gadgets and Gizmos | Computer Forensics | Tools and Equipment | Related articles
NAVIGATION: Home >>
Subclassing xbmcgui classes
Published by: rose 2009-01-07

  • i have been trying to create my own classes that are derived from the xbmcgui control* classes. the reason for doing this is so that i can add in pixel height, width checking so that labels don't render outside of the control area. i have run into a problem... here is a high level overview of what i'm trying to do:
    Print Page - XBMC Scripts::
    class myURLOpener(urllib.FancyURLopener): """ Subclass to override error 206 ( partial file addControl(xbmcgui.ControlImage(0,0720480, path.join(Root
    http://www.smdepot.net/forum/index.php?action=printpage;topic=2129.0
    HOME


    class label( xbmcgui.controllabel ):
    ...

    label = label( x, y, w, h, text, font )
    win.addcontrol( label )


    the label class implements setlabel() and it does extra checking and formatting of the label so that it fits within the dimensions of the control before calling the xbmcgui.controllabel.setlabel() method. this all seems to work fine when i test against my stubbed out version of xbmc.py and xbmcgui.py using python 2.3.3. however, when the same code runs in xbmc, i get an error like the following in the xbmc.log:


    11-04-2004 23:13:20 self.addcontrol( self.bgctl )
    11-04-2004 23:13:20 <.recordedwin object at 0x006fd030>
    11-04-2004 23:13:20 :
    11-04-2004 23:13:20 object should be of type control


    any ideas? is there a way to cast the instance down when calling addcontrol()? it seems like python does not realize that the class hierarchy is:

    label is-a xbmcgui.controllabel is-a xbmcgui.control

    just out of curiosity which version of the python interpreter is embedded in xbmc?


  • ok, there was a bug in the code when adding your own control type to a window.
    but, the error you get was already fixed a few days ago.
    with current cvs and your script, xbmc would just crash atm :d.

    anyway, it is fixed now.


  • any ideas? *is there a way to cast the instance down when calling addcontrol()? *it seems like python does not realize that the class hierarchy is: seems like a bug in my implementation of addcontrol() :)
    will try to fix it.
    just out of curiosity which version of the python interpreter is embedded in xbmc? 2.3


  • thanks darkie... i thought i was going crazy. :)





  • Red Hat's Rough Recovery From CFO Exit
    Windows Live Finds a New, Pre-installed Home

    You are looking at:hzgn.com's Subclassing xbmcgui classes, click hzgn.com to home
  • my stomaches been hurting for 3 days
  • green tea help high blood pressure
  • how much should i excercise
  • if i take my tampon out after 5 hours
  • is there no cure for fear of dying aging illness
  • does the ionization detox foot bath process work
  • are the abdominal muscles group the same as the the six pack
  • why did my breasts change so drastically
  • has anyone had success with st john 039 s wort
  • natural heartburn cure
  • how do i go about building up my arms
  • should i eat this chicken or not
  • origins or clinique 3 step system 4 for oily skin and acne
  • what are some ways to flush your system of drugs and alcohol
  •  
  • does anyoe know if the symptons i am having are fatigue
  • chest pain in the left side
  • nordette 28 using as emergency contraceptive
  • is it safe to take the total colon cleanse while breastfeeding
  • what causes a fever sore on the lips
  • is lexington steele abnorm and ill
  • ladies have you ever lost your drive libido
  • does anyone have suggestions on how to control excessive under arm sweating
  • best exercises for breast chest
  • can some one tell me what are the symptoms for h i v human immunodeficiency virus
  • is getting braces sore
  • getting my tonsils out wednesday what should i expect
  • is it safe that this happens or not a good idea
  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Subclassing xbmcgui classes , Please add it free.
     Homepage | Add to favorites | Contact us | Exchange links | LOGIN | Site map | 
    Copyright© 2008 hzgn.com        Site made:CFZ