23 Jan 2013 4:37 PM #1
TypeError: 'undefined' is not an object (evaluating 'h.substring') when loading store
Architect Build tested:
- Build: 678
- Touch 2.1.x
- Architect throws an error when using a store with a DataView with a custom DataItem.
- Create a model and store named 'store1' that properly loads data, set autoLoad to true. Right click store and click 'Load Data'
- Create a DataItem with alias 'dataitem' with proper style with a child component that has a proper tpl
- Create a DataView and check useComponents, defaultType to 'dataitem', and store to 'store1'
- Click on different views in the Project Inspector to load and reload the CSS for the DataView
- Loading of the store in Architect with the proper layout of DataItems and CSS in the view
- Window saying that an error occured:Code:
TypeError: 'undefined' is not an object (evaluating 'h.substring') Source Class: qrc:/designer/src/frameworks/touch21/framework/sencha-touch-all.js?0.3837460807990283 Line 18
Screenshot, Project, or Video:
- attached Project and picture of error
- Mac OS 10.7.5
20 Feb 2013 4:17 PM #2
I'd be very interested in at least a reasonable workaround for this bug.
20 Feb 2013 4:45 PM #3
Easiest thing would be to not autoload the store while in Sencha Architect.
20 Feb 2013 5:33 PM #4
20 Feb 2013 6:58 PM #5
I can confirm that the attached project throws an error even in our latest development build.
In a brief cursory look at this it looks like what's happening is that the default list item dependencies is not being taken into account. Ie we have to create teh defaultType class before trying to load the store (otherwise it won't know what to paint)Aaron Conran
21 Feb 2013 9:07 AM #6
Eric, nicely done on bug report details.
We've filed a bug. Well update you here when we know more.Phil Strong
24 Jun 2013 9:00 AM #7
I am still getting this issue in SA 2.2.2 Build 991.
1. Add Data View
2. Add Data View Item
3. Set Data View Item's userAlias as "mydataitem"
4. In Data View, check useComponent
5. In Data View, enter "mydataitem" for defaultType
Error message then generated!
9 Jul 2013 10:39 AM #8
This bug also happens to me when I use Sencha Architect to bundle my project for deployment. Any way around this?
11 Jul 2013 10:18 AM #9
This is a known bug where we are not loading the dataviewitem into the canvas when rending the data view in the canvas. I suspect this will work in the browser.Phil Strong
11 Jul 2013 11:33 AM #10
Yes it does work in the browser, but the message keeps popping up every time you click on that view which can be quite annoying if thats your main view