show image , onFocus()
#1
i have a list of categories and when i select one from it the image of the category selected is show but when i select the next category the image is not show
and i want to leave the liste and come back to it for complete showing images for each category and i have to do this every time whene i want to show the next category image
this is the image of the liste
Image

and this is code
Code:
def onFocus( self, controlId ):
        
        
        xbmc.log('plugin.program.boxty.visiophone : onClick')
        
        if controlId == CONTACT_LIST:

            list = self.getControl( CONTACT_LIST );
            item = list.getSelectedItem()
            myid = item.getProperty("MyID")
            myimage = item.getProperty("MyImage")
            
            xbmc.log('plugin.program.boxty.visiophone : myid    = ' + myid)
            xbmc.log('plugin.program.boxty.visiophone : image   = ' + myimage)
            
            self.getControl( RECIPIENT_IMAGE ).setImage(myimage);
and whene i change if with while i correct the error but whene i want to back or close the addon i cant do it
this is the code

Code:
def onFocus( self, controlId ):
        
        
        xbmc.log('plugin.program.boxty.visiophone : onClick')
        
        while controlId == CONTACT_LIST:

            list = self.getControl( CONTACT_LIST );
            item = list.getSelectedItem()
            myid = item.getProperty("MyID")
            myimage = item.getProperty("MyImage")
            
            xbmc.log('plugin.program.boxty.visiophone : myid    = ' + myid)
            xbmc.log('plugin.program.boxty.visiophone : image   = ' + myimage)
            
            self.getControl( RECIPIENT_IMAGE ).setImage(myimage);

and Thank You for every one can help me please !!
Reply
#2
does it help if you add xbmc.sleep(100) at the end of the while loop?
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
(2016-03-02, 13:17)ronie Wrote: does it help if you add xbmc.sleep(100) at the end of the while loop?

does not work
Reply
#4
(2016-03-02, 13:40)abdelfattah11 Wrote:
(2016-03-02, 13:17)ronie Wrote: does it help if you add xbmc.sleep(100) at the end of the while loop?

thank you is work Blush
Reply

Logout Mark Read Team Forum Stats Members Help
show image , onFocus()0