PDA

View Full Version : Adding events



bseddon
24 Feb 2012, 10:40 AM
Is it yet possible to add events to a view (this.addEvents('a', 'b'))?
Is it yet possible to add code to the initComponent function of a view to initialize arbitrary code?

Thanks

g13013
24 Feb 2012, 4:33 PM
I think it's planned to allow editing of the initComponent function, just be patient :).

ssamayoa
24 Feb 2012, 6:15 PM
Well, I been patient since Designer 1.0...

Designer allways is "almost ready"...

Thats the bad part of closed source: you cant make contributions and instead of hundreds even thousands of volunteers you have to what a few developers to clean the backlog, I mean bug fixing and implementing new features.

I admire everyone of the Sencha's developers but, as I said, everything allways is "amost ready".

Regards.

g13013
25 Feb 2012, 5:51 AM
I work with ExtJS from the version 2!, and I can say you that you have to be thankfull to have the opportunity to have a designer !!! they are transforming designer in to a veritable IDE, and as long as I know there is no equivalent for javascript!! after somme tests I was able to do almost everything, except for the iniComponent so ....wait

bseddon
25 Feb 2012, 11:50 AM
@ssamayoa

I can't agree with your perspective. Open source is not always great. In my view, ExtJS 4 is a great improvement and the designer is pretty good. Sometimes it takes a corporation to produce a workable tools. Tools like an IDE are pretty difficult to create, far more difficult than it seems it should be.

ssamayoa
27 Feb 2012, 8:07 AM
Open source is not always great.

But most of the time is great.



Sometimes it takes a corporavtion to produce a workable tools.
Tools like an IDE are pretty difficult to create, far more difficult than it seems it should be.

Not totally true. If you look at eclipse or netbeans, those IDEs were commercial products from IBM and Sun. After some versions they make OS and free so your premise wins there. But other tools/IDEs were born OS since day 1: ModoDevelop, Lazarus, Aptana IDE (based on eclipse), and so.

I'm not againts propietary/licensed software. ExtJS and Touch are OPEN SOURCE but NOT FREE for commercial use. OPEN SOURCE doesn't mean free software.

Regards.

ssamayoa
27 Feb 2012, 8:24 AM
I work with ExtJS from the version 2!, and I can say you that you have to be thankfull to have the opportunity to have a designer !!! they are transforming designer in to a veritable IDE, and as long as I know there is no equivalent for javascript!! after somme tests I was able to do almost everything, except for the iniComponent so ....wait

Thats exactly the problem: Do you use custom components (ux, 3er party or your own)? Do you use triggerfield?

To be usable we need such features

I have the impression that Designer is used more for Touch that ExtJS.

Regards.

aconran
28 Feb 2012, 11:35 PM
Regarding adding custom code to an implementation file please take a moment to review:
http://www.sencha.com/forum/showthread.php?184095-Breaking-changes-regarding-Code-Editing-Build-298

bseddon
29 Feb 2012, 3:34 AM
Thanks for the news. The post is written as 298+. I think that means builds after 298 (rather than 298 and later). I updated to 298 and deployed a default application with a single component and have seen that 298 generates the 'old' style .ui files.

I updated to 298 to test component export in the brave new 298+ world but since I could not try it myself, I'll ask the question.

It's great that it will be possible to edit the implementation file. Suppose I do this on a component I'm creating (this thread started because I want to be able add events and initialize code). What happens when I export the component? Is the manually changed implementation file content included also so I am able to import it into another project?

While on the topic of components I'd like to ask about CSS. For a number of builds now it has been possible to specify an additional CSS reference. I expect we will use the new capabilities you describe to create re-usable ExtJS components. Hopefully others will do this as well but this leaves open the prospect that each component could have its own CSS file. Right now it seems the component consumer will need to merge these multiple CSS files into a into a single file.

Is there a mechanism to accomplish this already?

Right now this task could be completed using a batch script (or something). But it would be ideal if this file reference could be specified in the project. In the component even. For example, it might be possible to specify the name of a related CSS file in a special property of the view component itself which the designer uses to generate <link> entries in designer.html.

aconran
29 Feb 2012, 9:19 AM
Thanks for the news. The post is written as 298+. I think that means builds after 298 (rather than 298 and later).

I updated it to say > 298.



It's great that it will be possible to edit the implementation file. Suppose I do this on a component I'm creating (this thread started because I want to be able add events and initialize code). What happens when I export the component? Is the manually changed implementation file content included also so I am able to import it into another project?


The current workings of it, no that impl file is not pulled into the saved toolbox. However I think that needs to happen.



While on the topic of components I'd like to ask about CSS. For a number of builds now it has been possible to specify an additional CSS reference. I expect we will use the new capabilities you describe to create re-usable ExtJS components. Hopefully others will do this as well but this leaves open the prospect that each component could have its own CSS file. Right now it seems the component consumer will need to merge these multiple CSS files into a into a single file.

Is there a mechanism to accomplish this already?


Sencha SDK Tools/JSBuilder have the ability to merge multiple js/css files into one but this is currently not built into designer.