You found a bug! We've classified it as
a bug in our system.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
-
Sencha Premium Member
Unable to add custom object (listConfig) - quotes are added
REQUIRED INFORMATION
Architect Build tested:
Project Type:
Description:
- When I add a "listConfig" custom propery to a combobox, select "Object" as the type, the object code is treated like a String by architect: quotes are added and new-lines get replaced by \r\n.
Steps to reproduce the problem:
add a "listConfig" custom propery to a combobox, select "Object" as the type, then write code
The result that was expected:
the code as it were typed as the value of the property
The result that occurs instead:
a string
HELPFUL INFORMATION
Screenshot, Project, or Video:
Possible fix:
Operating System:
-
Objects get stringified when they don't evaluate to real objects. In future version of Architect we do a better job of telling you this but for now it being a string and not an object is the only indication.
Objects should all be surrounded by curly braces
{
...
}
for instance
{
a: 1
note there is no ending curly brace would be stringified
-
Sencha Premium Member
Hi
Objects get stringified even when they are real objects, and surrounded with {}
Try with that, and you'll see the bug:
Code:
{
loadingText:i18n.patient_searching,
emptyText:i18n.patient_empty_result,
// Custom rendering template for each item
getInnerTpl:function () {
return '[{userName}] {lastName} {firstName} ';
}
}
Regards
-
Raw JavaScript references variables etc are not possible at this time. They must be implemented via overrides. We are aware of this and working to fix it in the next minor version.