Just FYI this code is part of ExtJS 4 script. I have a global setting which I use to show the path to the dir where my icons are. I'm making some modifications so before was:
g_settings.iconUrl
but now I need to pass a third argument property like this:
g_settings.iconUrl.docIcon
The problem I met is where I have an if statement where I check for different values:
if (extensions == 'doc'||extensions == 'docx'||extensions == 'xlsx'||extensions == 'xls)
and then I do:
extensions += 'Icon';
and I need to use:
g_settings.iconUrl.extension
when I use console.log(extensions) it's value is as expected (for example docIcon) but when I try to use it as a property it doesn't work. If I use console.log on:
console.log(g_settings.iconUrl+ '.' +extensions)
the output is [object Object].docIcon so I think I have to convert somehow extensions to object too.
I'm not sure that this will solve the problem but that's what I have for now.
Any suggestions?
Thanks
Leron
g_settings.iconUrla string before?