Results 1 to 2 of 2

Thread: Singleton Missing in Unbuilt App - Uncaught ReferenceError

  1. #1
    Sencha Premium User
    Join Date
    Jan 2014
    Location
    Fort Worth, TX, USA
    Posts
    62
    Answers
    2

    Exclamation Singleton Missing in Unbuilt App - Uncaught ReferenceError

    In my team's application, I'm trying to set up a singleton in each theme that handles branded information throughout the web app:
    Code:
    /** * @class ThemeA.verbiage.BitsAndPieces
     *
     */
    Ext.define("ThemeA.verbiage.BitsAndPieces", {
        singleton: true,
        alternateClassName: ['Verbiage'],
        emailAddresses: {
            contact: '[email protected]'
        }
    });
    I am using a require statement with the alternate class name in the application.js file, and in a view I am trying to use it as such:
    Code:
                        items: [
                            {
                                width: '100%',
                                html: [
                                    '<ul>',
                                        '<li>If  you love bacon, please email <a href="mailto:' + Verbiage.emailAddresses.contact + '" target="emailwin">' + Verbiage.emailAddresses.contact + '</a>.</li>',
                                    '</ul>'
                                ].join("")
                            }
                        ]
    This works fine when using the built versions of the app with their individual themes, and the proper verbiage displays in each. It also works fine when using sencha app refresh or sencha app watch and navigating to the unbuilt app. However, after building the app using sencha app build, the unbuilt version stops working and reports "Uncaught ReferenceError: Verbiage is not defined" in the console.

    Is there something else I need to do to ensure the singleton gets instantiated and available as the alternateClassName of Verbiage before the view complains?

  2. #2
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    Hi davmiller,

    Take a look at this thread, it appears there is an optimization being attempted that you can bypass.


    https://www.sencha.com/forum/showthread.php?291581


    Regards,
    Bryan

Similar Threads

  1. Uncaught ReferenceError: Ext is not defined
    By mlotfi in forum Ext: Q&A
    Replies: 10
    Last Post: 7 May 2014, 1:01 AM
  2. Uncaught ReferenceError: clearTimeout is not defined
    By kkitamura in forum Sencha Architect 3.x: Bugs
    Replies: 5
    Last Post: 17 Dec 2013, 12:28 PM
  3. [FIXED] Uncaught ReferenceError: Ext is not defined
    By HugoTrigo in forum Sencha Architect 2.x: Bugs
    Replies: 13
    Last Post: 22 Apr 2013, 9:48 AM
  4. Uncaught ReferenceError: Ext is not defined
    By HugoTrigo in forum Sencha Touch 2.x: Q&A
    Replies: 3
    Last Post: 17 Apr 2013, 10:45 AM
  5. Uncaught ReferenceError: Ext is not defined app.js:1 in chrome
    By derekeancedy01 in forum Community Discussion
    Replies: 3
    Last Post: 29 Nov 2012, 10:58 PM

Tags for this Thread

Posting Permissions

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