PDA

View Full Version : Refs not generating getters in beta 2?



tdekoekkoek
9 Feb 2012, 9:51 AM
I had this problem using an earlier version, but even with upgrading to beta 2, I am still getting null returned for my views when call getView from the controller:

so with a view with id: dataList

getDataList() returns null in init();

BTW, in order to use beta2 I had to move sencha-touch-all-debug.js from the builds directory to the root directory otherwise the .js and .css files wouldn't resolve properly.

Any ideas?

aconran
9 Feb 2012, 10:16 AM
BTW, in order to use beta2 I had to move sencha-touch-all-debug.js from the builds directory to the root directory otherwise the .js and .css files wouldn't resolve properly.


I realized this yesterday when we did the upgrade on the server. Expect the next build of designer to prefix builds/ in the path.

Where is the code you are invoking getView/getDataList from? What do your references look like? Could you send us a simple sample project?

Phil.Strong
9 Feb 2012, 10:28 AM
In case this isn't obvious:

In this case you would need to associate the top level view to the controller in question
Also you would need to create a controller reference (from toolbox) on the controller

setting the ref: dataList
setting the selector: #dataList

tdekoekkoek
9 Feb 2012, 10:48 AM
This project is basically following along the project in the video: First Look at Sencha Designer 2.0. All I have is a simple view where I am trying to put menu items.

tdekoekkoek
9 Feb 2012, 10:56 AM
How do you associate the top-level view to the controller? To my knowledge I am following exactly the steps in your video.

tdekoekkoek
9 Feb 2012, 11:22 AM
BTW, Our main prototype App written in 2.0.pr3 does not display at all in beta 2.

Phil.Strong
9 Feb 2012, 11:35 AM
First thing I see is your controller doesn't have MainNav as a view

tdekoekkoek
9 Feb 2012, 11:45 AM
First thing I see is your controller doesn't have MainNav as a view

Yeah, I think I removed it when wanting to make the sample project smaller. Adding it back in did not change the result for me.

Phil.Strong
10 Feb 2012, 2:08 PM
So the refs are generating correctly otherwise it would error out on getDataList (saying it was undefined). What's happening here is that nothing has yet to render because you haven't configured your store correctly?

store isn't set to autoLoad nor is the proxy url set.

baushaug
11 Feb 2012, 8:11 PM
@Phil Strong I do declare my Viewport Container in my Controller's view configuration array. I still cannot access my Viewport Container by the supposed "getter" methods that are supposed to be automatically generated as suggested by this article.

http://www.sencha.com/learn/architecting-your-app-in-ext-js-4-part-3

I (http://www.sencha.com/learn/architecting-your-app-in-ext-js-4-part-3)'ve attached my code-base, can you give me suggestions as to what is wrong ?