1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    13
    Vote Rating
    0
    laji.inbox is on a distinguished road

      0  

    Default How to add a "standalone" class in the architect?

    How to add a "standalone" class in the architect?


    From time to time, I need to create a custom class, but I could not find anyway to do it inside Architect. For example, I need to add a utility kind of class as a Mixin. So this class would be a simple regular standalone class that my component can reference, but it's not a controller classs. I couldn't find a way to "define a new class" in the architect. Did I miss anything here?

  2. #2
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      1  

    Default


    If this mixin will be used in a SA class, I guess you can mix your class creating an override class.

    Of course you have to include your code via resources (I dont remember in which order are included in app.html) or include using custom html lauch page.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    13
    Vote Rating
    0
    laji.inbox is on a distinguished road

      0  

    Default


    The issue with SA is that it manages everything, so:
    - you can't change app.html as SA will overwrite it.
    - you can't directly edit the source file as the interface doesn't allow you to, and if you do it outside of SA, it'll overwrite it. For example, you can not set the "requires: ..." property because it is not presented in SA.

    I feel this limitation has my hands totally tied up. I wasted lots of time trying to going around it. Since I'm learning this stuff, I search the web for problems I encountered, but many times I can not apply the solution found because SA does not allow you do to it.

  4. #4
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    Quote Originally Posted by laji.inbox View Post
    - you can't change app.html as SA will overwrite it.
    Write your own which includes your custom code and lauch that instead of app.html. I do that.

    Quote Originally Posted by laji.inbox View Post
    - you can't directly edit the source file as the interface doesn't allow you to, and if you do it outside of SA, it'll overwrite it.
    Thats the reason you can create an override class with SA.
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  5. #5
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    8,883
    Vote Rating
    102
    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

      1  

    Default


    Quote Originally Posted by laji.inbox View Post
    How to add a "standalone" class in the architect?
    You cannot directly implement a standalone in class in Architect. However, what you can do is use a class that has already been implemented outside of Architect and include it in the project. You can either use dynamic loading via a requires statement or you could directly include it via a JavaScript resources node.

    Quote Originally Posted by laji.inbox View Post
    For example, you can not set the "requires: ..." property because it is not presented in SA.
    That's not true. Click on the Application node, search for "requires" in the configuration panel. Add the requires statements that you need.

    Quote Originally Posted by laji.inbox View Post
    I feel this limitation has my hands totally tied up. I wasted lots of time trying to going around it. Since I'm learning this stuff, I search the web for problems I encountered, but many times I can not apply the solution found because SA does not allow you do to it.
    SA will cover most of the cases you need, for the cases which it doesn't you should create an override. An override is implemented in a free form text editor and will let you do whatever you would like.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  6. #6
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    New Zealand
    Posts
    102
    Vote Rating
    15
    wayne.rudd will become famous soon enough

      1  

    Default


    Quote Originally Posted by laji.inbox View Post
    The issue with SA is that it manages everything, so:
    - you can't change app.html as SA will overwrite it.
    - you can't directly edit the source file as the interface doesn't allow you to, and if you do it outside of SA, it'll overwrite it. For example, you can not set the "requires: ..." property because it is not presented in SA.

    I feel this limitation has my hands totally tied up. I wasted lots of time trying to going around it. Since I'm learning this stuff, I search the web for problems I encountered, but many times I can not apply the solution found because SA does not allow you do to it.
    There is quite a big learning curves in SA learning 'where' things should/can be done - without resorting to coding outside of SA or even needing to do an overide. Generally you can put all the custom coding you need in BasicFunctions in Controllers if SA doesn't do exactly what you need (or you haven't figured out how to do it in SA yet...)

  7. #7
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    Quote Originally Posted by wayne.rudd View Post
    There is quite a big learning curves in SA learning 'where' things should/can be done - without resorting to coding outside of SA or even needing to do an overide. Generally you can put all the custom coding you need in BasicFunctions in Controllers if SA doesn't do exactly what you need (or you haven't figured out how to do it in SA yet...)
    In SA's documentation would be nice to have a section "use cases". I can do almost anything from SA but I been using it since public beta started.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  8. #8
    Sencha User
    Join Date
    May 2012
    Posts
    13
    Vote Rating
    0
    laji.inbox is on a distinguished road

      0  

    Default


    Thanks so much for all the helpful replies above!

    I double checked, as shown in the screen below, the Application node does not have a requires config property:
    sreen.jpg

    I have been using the Behavior -> Basic function to arrange my custom codes so far, it works well if the logics is only used in the same class. In many cases, it makes more sense to create a new standalone class file. Since my post yesterday, what I have done is to create the class outside of the SA, then just use it in my SA managed code. This works well so far except the still pending question I have about the "requires" config, for which I still see warning on synchronous loading of classes. So if anyone can, please give me a more detailed example on how to add "requires" in a SA Application.

    And thanks for pointing out the override feature in SA, it is only allowed for non-Application classes, which is understandable.

  9. #9
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,181
    Vote Rating
    77
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    It seems that you have an older version of SA.

    Mine is build 442, which one you have?
    UI: Sencha Architect 3.x / ExtJS 4 MVC
    Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
    Application Server: Glassfish 3.1.x
    Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5

    If you like my answer please vote!

  10. #10
    Sencha User
    Join Date
    May 2012
    Posts
    13
    Vote Rating
    0
    laji.inbox is on a distinguished road

      0  

    Default


    Mine is build 412. I just re-downloaded it from the site and it's the same build #412. .. Where do you download your build from?

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar