PDA

View Full Version : Define "alias" poperty for component n Ext Designer



mik3e
30 Jan 2012, 10:13 AM
Hi there,

Today I try to use Ext Designer for an application based on MVC pattern. I just want to design the single views with the designer, export them and add the required Controller and models with my default IDE.

It works fine but there is one little problem what I haven´t found a solution for till now:

Does anyone know a way to define the "alias" property for a component in Ext Designer? That´s very important, cause I most often use the xtype to address a component.

Thanks & Cheers,
Michael

aconran
30 Jan 2012, 10:01 PM
Configure the userXType in Ext 3.x or the userAlias in Ext 4.x.

mik3e
1 Feb 2012, 1:27 AM
Hi,

I already did (defined the component property "userAlias" in the Designer for the Form Panel), but it isn´t integrated in the generated source code:


Ext.define('LT.view.ui.Edit', {
extend: 'Ext.form.Panel',


layout: {
type: 'auto'
},
bodyPadding: 10,


initComponent: function() {
var me = this;
.....

Looks like a small bug. I´m using version 1.2.2 Build 48 of Ext Designer.

Michael

aconran
1 Feb 2012, 7:50 AM
mik3e -

The userAlias will go into the actual class that will be instantiated.

Each component that you create in the designer will create two classes. The ui class which has all of the layout specific configuration information and then an implementation class which you are to extend and actually instantiate.

If you were to export the project you would see the userAlias would be placed in the implementation class. I just tested this with 1.2.2 Build 48 and it is working properly.

I highly recommend that you take Designer 2.0 for a spin, we released the beta this week.
http://www.sencha.com/blog/sencha-designer-2-beta-announcement/

mik3e
2 Feb 2012, 1:28 AM
Hi,

Ok, I c... thanks for the advice...
I´ve just downloaded v2 and will have a look at it :)

mik3e
2 Feb 2012, 4:22 AM
I must say: Congrats! This IDE looks really useful - especially for use with the MVC pattern - great work guys. I´ll try to realize my actual project with Sencha Designer and report any bugs I´ll find...

Cheers,
Mike