PDA

View Full Version : Suggestion [feature request]



g13013
24 Feb 2012, 4:43 PM
Hi dev team,
As I test the designer, I notice that somme features would be very helpful without talking about the initComponent editing posibility that was discussed many times, and as I know it's planned.

1-it would be good if the designer could detect functions and null as a value for a custom property.
2-The possibility to edit the constructor also, especially for stores would be good.

that's it for now :D

ssamayoa
24 Feb 2012, 6:23 PM
1-it would be good if the designer could detect functions and null as a value for a custom property.


What you mean?



2-The possibility to edit the constructor also, especially for stores would be good.


Wellcome to the club!

I think Sencha should allow the editing of those for "advanced users" (put a BIG notice that you may break your code when you do that) instead of allways fencing or protecting naive or new users.

I have the impression that framework to do that is already in place but Sencha's developers are trying to be sure that you dont break things making dynamic language (JS) as strong typed one (say OP or java).

They are trying to be preasant with God and Evel (advanced users and naive ones, you choose who is who) at the same time.

Regards.

g13013
24 Feb 2012, 6:42 PM
What you mean?


Designer does not allow initializing custom properties to null, it raises and undefined error.

for the functions, I wanted for example to attach a store to a component, there is two ways to do it. From a function ideally iniComponent function, or just put in the config the return value of Ext.getStore('storeId') , like that

{
xtype:'panel',
store:Ext.getStore('storeId')
}

but a this stage every function that I put is converted to empty string.

CaliLuke
25 Feb 2012, 9:15 AM
Don't be so negative, we said before that many restrictions will be dropped over time as we improve our ability to understand user-made changes. It's a time consuming process and we have many other things to finish in order to have a good 2.0 launch, but after that there will be 2.1, 2.2 and so on.

I think we have shown enough flexibility and good faith with other changes and tweaks to be granted the benefit of the doubt at this point, right?

C'mon, be our friend \:D/

g13013
25 Feb 2012, 9:26 AM
Good work indeed, it's just a request :)

aconran
28 Feb 2012, 11:36 PM
Designer does not allow initializing custom properties to null, it raises and undefined error.

for the functions, I wanted for example to attach a store to a component, there is two ways to do it. From a function ideally iniComponent function, or just put in the config the return value of Ext.getStore('storeId') , like that

{
xtype:'panel',
store:Ext.getStore('storeId')
}

but a this stage every function that I put is converted to empty string.

for this specific example the string 'storeId' would automatically lookup the store, you don't have to put in Ext.getStore()

g13013
28 Feb 2012, 11:44 PM
for this specific example the string 'storeId' would automatically lookup the store, you don't have to put in Ext.getStore()


Hi,
even if the base class of component "ex:panel" doesn't have a property 'store' ?

aconran
28 Feb 2012, 11:51 PM
Uhm why would you do that unless you were developing some sort of custom component?

You could add store: 'storeId' as a custom property and then use Ext.StoreMgr.lookup just like we would.

g13013
29 Feb 2012, 12:41 AM
Yes it's a custom component, and i was'nt aware of the lookup() function thanks for the tip.

I am just wondering, what is more performant gettting store with Ext.getStore() at each time I need it in hte component or attach the store as I do now and invoque like component.store ? for me my method is more efficient! what do you think ?