PDA

View Full Version : ComboBox throws err in prod build but not in dev



kbow
21 Jun 2012, 3:37 AM
I've been working to migrate our app from dev to prod using the Sencha build utility and ran into a weird issue. We've got an xtype: combobox in a grid that works fine in dev. After building/compressing the source for prod, that same combo throws a javascript error based on this code:




//<debug> if (me.typeAhead && me.multiSelect) { Ext.Error.raise('typeAhead and multiSelect are mutually exclusive options -- please remove one of them.'); } if (me.typeAhead && !me.editable) { Ext.Error.raise('If typeAhead is enabled the combo must be editable: true -- please change one of those settings.'); } if (me.selectOnFocus && !me.editable) { Ext.Error.raise('If selectOnFocus is enabled the combo must be editable: true -- please change one of those settings.'); } //</debug>

Based on this error, I made the appropriate changes to our code (had to change editable to true), but I really want to understand why this didn't "throw" in dev, it worked fine. I'd like to figure this out in case there are additional areas that we uncover during our production tests.

I checked the Loader history in dev and it is not "loading" anything additional after the combobox click.

Thanks

kbow
21 Jun 2012, 5:03 AM
After further investigation, it appears the ext-all-debug-w-comments does not have that particular debug code in it like the src/form/field/ComboBox.js file does (sencha build uses this file). ext-all-debug.js does not have it either, but ext-all-dev.js does. It makes me a bit nervous with all of these versions having slightly different code.