Hybrid View

  1. #1
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Vote Rating
    8
    Kikketer will become famous soon enough

      1  

    Default External Editor Support

    External Editor Support


    "However, if you already have a favorite IDE, not a problem."
    There is a problem, once you move to the external IDE you are stuck there.

    I can understand how it's difficult for a 2 way (code to GUI). But what if I'm simply writing the portions that Architect forces me to hand code externally?

    I have a hand written project that I attempted to recreate using Architect and I've run into several issues.

    Here's an example of a portion of code I would have to hand write in a controller:
    Code:
    onListItemTap : function (dataview, index, target, record, e, options) { 
       this.getAppList().push({
          xtype : "overallchart"
        });
    }
    First off, any externally created file (like a chart) does not appear in the proper section. My "OverallChart.js" is currently residing in the Views folder. It does not appear in Architect, and I can not find some sort of "refresh".

    The code above also shows two red Xs stating that the "xtype" line is missing an ending }...

    Also, if I go into WebStorm and edit this code, there is absolutely no way to refresh it inside Architect. Because Architect currently lacks any sort of coding assistance (even locally declared variables must be hand written) I really lean to WebStorm to actually write the code. The minute I save the files in Architect they are all reverted to whatever Architect is incorrectly holding them as. Even restarting Architect does not pull in the latest changes to the files.

    In conclusion... no you can not effectively use an external program with "not a problem".
    Last edited by Kikketer; 19 Apr 2012 at 8:24 AM. Reason: Added a little to the code example

  2. #2
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,953
    Vote Rating
    65
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Here's an example of a portion of code I would have to hand write in a controller:
    why would you need to do this in an external editor

    This is a controller action.

    select controller
    in config pane find actions
    click (+)
    ...
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  3. #3
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Vote Rating
    8
    Kikketer will become famous soon enough

      0  

    Default


    Yes, I click the +, I added the "onListItemTap" but that's not what I was trying to point out. The code within that is where I was attempting to use an external program. I assume there will be other spots like this that will need a bit more logic than a simple push (which doesn't seem to be working for me btw).

    The real issue that's pestering me now is the integration (or lack there of) with Charts. I'm fine if I had to write any extra views and such that would be specifically chart items, but the fact that they do not appear in Architect at all kind of throws things off. Since it overwrites the "app.js" every time I save:

    Code:
    views : ['Main', "AppList", "Intake", "OverallChart"],
    Here is the example code from the hand written one. I can't edit the code for app.js, or simply add that view into the tree of elements.

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,445
    Vote Rating
    129
    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


    Going to Application and typing "OverallChart" into the views and pressing enter should work...
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Vote Rating
    8
    Kikketer will become famous soon enough

      0  

    Default


    Quote Originally Posted by aconran View Post
    Going to Application and typing "OverallChart" into the views and pressing enter should work...
    At the top of the code window while having "Application" selected, it says "read only". I can mash the keyboard all day but nothing is entered into the code.

    Is there a way to have it refresh?

    Just now I changed the code in app.js to have "OverallChart" via an external editor, but it did not reflect back into Architect. Even after quitting and restarting it.

    Maybe it would be fixed by having an ability to create a custom item in the toolbox, just so I can add it to the tree on the right and then be able to add it to the project. Of course this is useless if I can't refresh the code and have it up to date.

    Both my external editor and Architect are pointing at the same folder (the .xds exists in the folder that I'm editing the files).

  6. #6
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,445
    Vote Rating
    129
    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


    Select the Application node.
    In the bottom right hand corner of architect in the config grid find the "views" section. To the right of the views there will be the views you've already added via Architect.
    Click the (add another) section. Type in "OverallChart", press enter
    Aaron Conran
    @aconran
    Sencha Architect Development Team