Results 1 to 2 of 2

Thread: Adding a singleton via a theme package

  1. #1
    Sencha Premium Member valio's Avatar
    Join Date
    Jan 2014
    Posts
    203
    Answers
    8
    Vote Rating
    22
      0  

    Default Adding a singleton via a theme package

    How can I define a singleton in a theme package, that can be read out in the app?
    I tried to put the following into the src folder of the package, but still can't access Ext.ThemeInfo in the app
    Code:
    Ext.define("Ext.ThemeInfo",{
        singleton: true,
        isDark: false
    });
    That's similar to how Ext.theme.Material is defined in the theme-material package.

    I assume I'm just at a loss there, as I'm not that well versed in using ExtJS themes... -_-

  2. #2
    Sencha Premium Member valio's Avatar
    Join Date
    Jan 2014
    Posts
    203
    Answers
    8
    Vote Rating
    22
      0  

    Default

    I found the solution: just add the code to <theme-pkg-directory>/overrides/init.js

Similar Threads

  1. Replies: 0
    Last Post: 6 Feb 2017, 7:44 AM
  2. Replies: 1
    Last Post: 30 Dec 2016, 12:50 PM
  3. ExtJs 6 unable to access singleton in locale package
    By s.noel in forum Ext JS 6.x Q&A
    Replies: 8
    Last Post: 12 Jul 2015, 9:54 AM
  4. Replies: 1
    Last Post: 12 Jul 2014, 12:37 AM

Posting Permissions

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