Why doesn't this code work?  I get the error tuple not callable:

def createMenu(self, arg=None, menuw=None):
ha_menu_items=[]
for room in config.HA_ITEMS:
index=config.HA_ITEMS.index(room)
ha_menu_items+=[menu.MenuItem(room[0],(self.createDeviceMenu, room[0]))] # <---here is what causes the error, but why?
ha_menu=menu.Menu("Home Automation", ha_menu_items)
menuw.pushmenu(ha_menu)
menuw.refresh()
def createDeviceMenu(self, room, arg=None, menuw=None):
ha_menu_items=[]
ha_menu_items+=[menu.MenuItem(room)]
ha_menu=menu.Menu("Devices", ha_menu_items)
menuw.pushmenu(ha_menu)
menuw.refresh()
return





------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Freevo-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to