PDA

View Full Version : initialConfig in 1.0.2.12



MrRoyce
1 Sep 2010, 6:38 AM
Hi there, I am trying to use the new initialConfig object that is described in the changelog for the 1.0.2.12 version. I don't see any initialConfig object. I specified an URL for a test component and the generated ui class has the URL embedded.

Am I missing something?

regards,
Royce

jarrednicholls
1 Sep 2010, 7:14 AM
Hi Royce,

Is the test component a FormPanel? http://cl.ly/f99486928c0b373a2fad

Thanks,
Jarred

MrRoyce
1 Sep 2010, 9:25 AM
Yes, it is a FormPanel. Is that the problem??

MrRoyce
1 Sep 2010, 10:11 AM
Yes, I am using v1.0.2.12.

Ok, then it is my misunderstanding of how it is supposed to work. I thought a separate component would be constructed that I could override with my own values. i.e. I usually create a file that has all of my variables defined (e.g. URL) so that I could then simply use the variable name as necessary (obviously this allows me to change one variable when/if the target URL changes).

I thought that initialConfig was supposed to help with that as described in the docs? Please forgive my ignorance, if I am misunderstanding how to use a variable in such a case, please advise.

wemerson.januario
2 Sep 2010, 4:19 AM
Jarred, Ext Designer is generating initialConfig code like this.

initialConfig: Ext.apply(this.initialConfig, {
fileUpload: true
}),

Is it Correct?
When I export my project. I am have problem, The window that has forms does not apear

jarrednicholls
2 Sep 2010, 4:23 AM
No it's not correct, this is mentioned in a bug report in the bugs forum, and is already corrected for the next release I am putting out today.

Sorry for the inconvenience,
Jarred

wemerson.januario
2 Sep 2010, 4:30 AM
The Designert is applying initialconfig in the same initialConfig

this.initialConfig = Ext.apply(this.initialConfig, {
fileUpload: true
});

I think the correct way is


Ext.apply(this.initialConfig, {
fileUpload: true
}),

without this.initialConfig =

jarrednicholls
2 Sep 2010, 7:59 AM
Hey wemerson,

Either one is correct. Due to the nature of the underlying code generation, the former will be used. It is also more "explicit".

Thanks,
Jarred