Results 1 to 6 of 6

Thread: Custom classes, not components

  1. #1
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,560
    Vote Rating
    381
      0  

    Default Custom classes, not components

    How can I include my custom classes?

    For example, for constants and utility functions I use singletons which I included in my app using "requires" at application level. I cant find in Designer the ability to define custom classes (event if I have to copy/paste from my current source files), just custom components.

    So, how to address this?

    Regards.
    UI: Sencha Architect / ExtJS 4 - 6
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: WildFly / Weblogic
    Databases: Oracle
    / MySQL / DB2 / Firebird

    If you like my answer please vote!

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488
    Vote Rating
    147
      0  

    Default

    There is currently no way to create classes that are not views, models, stores or controllers.

    You can always setup your constants in your Application's launch function.

    You can also include external libraries that have already been developed like so:
    http://www.sencha.com/forum/showthre...-and-deploy-it
    Aaron Conran
    @aconran

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Location
    New York, NY
    Posts
    14
    Vote Rating
    1
      0  

    Default

    Hmm, I'm finding this to be a challenge in the context of an Architect-based application developed with a need for nested saves of Models. The simplest solution seems to be outlined here, but creating a custom writer subclass is either not obvious to this naive user or not possible.

    Any thoughts on how to best handle this? Thanks!

  4. #4
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488
    Vote Rating
    147
      0  

    Default

    You can link a JS resource for your custom writer and then use an override in your store/model to leverage this writer.

    In Sencha Architect 2.1.x, it is arguably 'difficult' to achieve. In Architect 2.2, we've added a feature that allows you to link custom classes that aren't natively in Architect's toolbox much easier.
    Aaron Conran
    @aconran

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Location
    New York, NY
    Posts
    14
    Vote Rating
    1
      0  

    Default

    Quote Originally Posted by aconran View Post
    In Sencha Architect 2.1.x, it is arguably 'difficult' to achieve. In Architect 2.2, we've added a feature that allows you to link custom classes that aren't natively in Architect's toolbox much easier.
    There's a lot of stuff that Architect makes a lot easier, so it's not a huge loss IMHO to have to jump through hoops now and then. Is it possible for Architect to be developed with Architect? It seems like many of these issues would be evident in such a process and would get optimized quickly.

  6. #6
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    559
    Vote Rating
    44
      0  

    Default

    If I'm not mistaken, Architect is built using ExtJS. Not sure if they use architect or not but I agree with your suggestion. Dog-food the app.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •