Trying to call an object container with a callback, and as one of the parameters, having a list.....
But somehow the list doesn't make it over to the new function/container properly, cuz I can't loop the list.
Can however from the calling function
Anyone?
Sample:
oc = ObjectContainer(no_cache=True)
try:
sections = XML.ElementFromURL(PMS_URL).xpath('//Directory')
for section in sections:
title = section.get('title')
key = section.get('key')
paths = section.xpath('Location/@path')
Log.Debug("Title of section is %s with a key of %s and a path of : %s" %(title, key, paths))
for path in paths:
Log.Debug("Path is %s" %(path))
oc.add(DirectoryObject(key=Callback(confirmScan, title=title, paths=paths, key=key), title='Look in section "' + title + '"'))
except:
pass
oc.add(PrefsObject(title='Preferences', thumb=R('icon-prefs.png')))
Log.Debug("********** Ending MainMenu **********")
return oc
/Tommy