dialogs.list can now accept a function as source