1. #1
    Sencha User
    Join Date
    Jan 2009
    Posts
    74
    Vote Rating
    0
    rajesh_kar123 is on a distinguished road

      0  

    Default My code feature is not working in Sencha Architect 2x

    My code feature is not working in Sencha Architect 2x


    Hi,
    I have got a licensed version of Sencha Architect 2 installed in my system.
    The design view part is ok, but if i want to add some code in the code view, i have added, but it does not reflect in the design view.
    Is there any way out?

    Regards,
    Rajesh

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,308
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Could you post code to show what you mean?

    Code that you've written is not going to render on the design canvas.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User
    Join Date
    Jan 2009
    Posts
    74
    Vote Rating
    0
    rajesh_kar123 is on a distinguished road

      0  

    Default


    Hi Sir,

    The following code from Sencha Architect 2x:

    <code>
    Ext.define('MyApp.view.MyViewport', {
    extend: 'Ext.container.Viewport',

    initComponent: function() {
    var me = this;
    Ext.applyIf(me, {
    items: [
    {
    xtype: 'panel',
    title: 'My Panel'
    }
    ]
    });
    me.callParent(arguments);
    }
    });
    </code>
    1) Ok I agree that the code part of the sencha acrchitect is readonly.

    But if I change any specific code outside the tool and comeback to architect, it does not reflect the code.

    It means I have to do each and everything through the design aspect of it.

    2) My understanding was just the other WYSWYG tools like dremweaver, I should be able to work edit the code view and get the design view reflected the same.

    3) So the Sencha Architect is only useful for me to draw the Layout part quickly.

    Let's say, I enter a grid panel in design view and then it takes lot of time to create the store,model everything.

    Instead of doing that, if I was able to copy paste a piece of existing code inside the code view of Architect, then I would have done my grid fatster.

    Please correct me if I am wrong with it.

    Regards,
    Rajesh

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,308
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    You cannot paste arbitrary code into Architect and have it render inside the design canvas.

    You *are* able to add arbitrary code to Architect in the form of an override or an external JS file. However, these will not render in the design canvas.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    21
    Vote Rating
    1
    bgeiger is on a distinguished road

      0  

    Default Drawing a Circle

    Drawing a Circle


    I'm not entirely clear on how to go about getting the javascript code working in architect the way you describe. So, let's say I wanted to draw a circle in a Container. For example:
    • Where do I create the js file;
    • What's the sample code;
    • Where do I put the call in Architect;
    • How do I control when it's called (which is probably related to the previous question)?

  6. #6
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,308
    Vote Rating
    125
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by bgeiger View Post
    let's say I wanted to draw a circle in a Container
    How do you intend to do this? have you created a class? are you using the draw package?
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  7. #7
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    21
    Vote Rating
    1
    bgeiger is on a distinguished road

      0  

    Default Drawing a Circle

    Drawing a Circle


    I would use the draw package. I'm trying to make this example as simple as possible, and also using the built-in drawing tools would make the most sense to me. Something like http://stackoverflow.com/questions/9...is-not-drawing
    Last edited by bgeiger; 27 Jun 2012 at 1:19 PM. Reason: Accidentally re-posted a comment when I went back in the browser.

  8. #8
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    21
    Vote Rating
    1
    bgeiger is on a distinguished road

      0  

    Default


    In fact, if I could get the example from section I of http://docs.sencha.com/ext-js/4-1/#!...g_and_charting rendering into a panel, I would be all set. So far I've copied the code into its own js file, put that file in my path, and added it as a resource to my project. But I've made no code changes, and I'm not quite‚Äč sure yet how to get it into my panel.

Thread Participants: 2