Configuration Objects Converted to String

Configuration Objects Converted to String

When adding configuration objects like Ext.window.Window.loader, the object is converted to a string. I was expecting it to be left as an object. In any case, the configuration does not work... either is ignored upon load or creates errors.

I don't think it's a formatting issue. To show a simplified example, I've attached 2 screenshots showing a loader config object that gets converted to a string. I should note that I tried wrapping the object in curly brackets as well but that too was converted. The pic on the left is the class definition with the object converted to a string. The right one is the editor for the config object.

It looks like the object's property names must be wrapped in quotes. That's okay but isn't the way Architect or myself write them in our own code. Easy enough to do now that I've figured that out. However, there's still a problem if you want to assign a variable to a property like this:

{'productNumber': myProductNumberVar }

This gets converted to string even though it's a valid Javascript object.

Fair enough. Also, I did find at least one object editor that accepts property names without quotes: the 'editor' parameter on Grid columns. So it looks like the object editors are applying inconsistent formatting rules. Not a big deal but something to be aware of.

Definitely need to have a warning message letting the user know about these restrictions when it converts it to a string with perhaps an option to disable the warning. This took my colleague and I several hours of trial and error and then searching here to figure out why our JSON object was always converted to a string. Also, definitely need the ability to handle varialbles, functions and JS expressions.