30 Jan 2012 7:54 PM #1
Perhaps I missed something somewhere, but I thought this edition of Designer would allow the editing of the generated code. The code view window contains a banner that says "Code is Read Only" and there doesn't seem to be an obvious way around it. How does one go about editing the code inside Designer?
30 Jan 2012 9:47 PM #2
M. McConnell -
You can edit the code but the designer enforces that you follow a structure to building your applications.
At the top left hand side of the code viewer you will see a dropdown that allows you to switch between the ui class and the implementation class. These views are read-only. All other methods in the dropdown can be edited.
You can add more functions to the class by adding "Basic Functions" or event bindings to the class.Aaron Conran
31 Jan 2012 6:40 AM #3
Thanks for your quick reply, Aaron. I'll take another look when I start to piece together an application over the next couple of days.
I have to say, the Sencha framework (and tooling) is leaps and bounds ahead of anything else I've looked out in the wild. Most of my time is spent developing enterprise Flex applications and I'm still inclined to believe Flex is better suited for large scale applications. However, with everything you're doing to make Sencha a better suite of solutions, the line is definitely starting to blur. You guys do great work.
31 Jan 2012 4:02 PM #4
31 Jan 2012 6:12 PM #5
31 Jan 2012 7:25 PM #6
31 Jan 2012 8:54 PM #7
We have a ticket to be able to add user specific code inside the initComponent but this is currently not possible.
What are you trying to achieve? You probably could use a controller and/or some other technique to get what you want. If you post the full example, please start another thread and link to it from here.Aaron Conran
1 Feb 2012 1:11 PM #8
running code in Application's launch function
How's does one run code in the launch function? I ended up creating a Basic Function in the Application class and modifying (or hacking) the Application file in .metadata to get the Basic Function called from the launch function. What's the "right" way to accomplish this?
1 Feb 2012 1:31 PM #9
After clicking on the application, goto the code view. You can then change the drop down at the top left to "launch" and then edit the code.
We know that this user experience is not ideal and are looking at how to make it more obvious.Aaron Conran
1 Feb 2012 7:04 PM #10
One thought @wemerson.januario was to allow you to mark a function as an init function and thus Designer would call this function from the init function for a view, model, store, controller. How does that feel?Phil Strong