Results 1 to 4 of 4

Thread: Pull to Refresh & Sencha CMD

  1. #1
    Sencha User joostvanhassel's Avatar
    Join Date
    Jan 2012
    Location
    Rotterdam, The Netherlands
    Posts
    102
    Answers
    1
    Vote Rating
    1
      0  

    Default Pull to Refresh & Sencha CMD

    The pull to refresh plugin doesn't seem to work on devices when I compile & minify all JS files from Architect to one JS file. This is similar (but not exactly the same) as the issue found here

    If I run the app (either in browser or on device using PhoneGap) uncompiled & not minified, the plugin works great, if I compile & minify everything into one JS file using Sencha CMD, a JS error occurs in app.js:
    Uncaught TypeError: Cannot call method 'substring' of undefined

    If I remove the PullToRefresh plugin from my code, everything works just fine after compiling & minifying. The plugin itself is setup very basic: all default settings, with a refreshFn containing just a simple console.log('refresh called');

    full error as seen in console Google Chrome:
    Code:
    Uncaught TypeError: Cannot call method 'substring' of undefined app.js:1
    Ext.ClassManager.parseNamespace app.js:1
    Ext.ClassManager.get app.js:1
    Ext.ClassManager.instantiate app.js:1
    Ext.ClassManager.instantiateByAlias app.js:1
    Ext.apply.factory app.js:1
    Ext.define.applyPlugins app.js:1
    j app.js:1
    b.implement.initConfig app.js:1
    Ext.define.constructor app.js:1
    b.implement.callParent app.js:1
    Ext.define.constructor app.js:1
    b.implement.callParent app.js:1
    Ext.define.constructor app.js:1
    b.implement.callParent app.js:1
    Ext.define.constructor app.js:1
    f app.js:1
    (anonymous function)
    Ext.ClassManager.instantiate app.js:1
    Ext.ClassManager.instantiateByAlias app.js:1
    Ext.apply.factory app.js:1
    Ext.define.factoryItem app.js:1
    Ext.define.add app.js:1
    Ext.define.applyItems app.js:1
    j app.js:1
    (anonymous function) app.js:1
    Ext.define.applyActiveItem app.js:1
    (anonymous function) app.js:1
    b.implement.initConfig app.js:1
    Ext.define.constructor app.js:1
    b.implement.callParent app.js:1
    Ext.define.constructor app.js:1
    f app.js:1
    (anonymous function)
    Ext.ClassManager.instantiate app.js:1
    Ext.ClassManager.instantiateByAlias app.js:1
    Ext.apply.factory app.js:1
    Ext.define.factoryItem app.js:1
    Ext.define.add app.js:1
    Ext.define.applyItems app.js:1
    j app.js:1
    (anonymous function) app.js:1
    Ext.define.applyActiveItem app.js:1
    (anonymous function) app.js:1
    b.implement.initConfig app.js:1
    Ext.define.constructor app.js:1
    b.implement.callParent app.js:1
    Ext.define.constructor app.js:1
    f app.js:1
    (anonymous function)
    Ext.ClassManager.instantiate app.js:1
    Ext.ClassManager.instantiateByAlias app.js:1
    Ext.apply.factory app.js:1
    Ext.define.factoryItem app.js:1
    Ext.define.add app.js:1
    Ext.define.applyItems app.js:1
    j app.js:1
    (anonymous function) app.js:1
    Ext.define.applyActiveItem app.js:1
    (anonymous function) app.js:1
    b.implement.initConfig app.js:1
    Ext.define.constructor app.js:1
    b.implement.callParent app.js:1
    Ext.define.constructor app.js:1
    f app.js:1
    (anonymous function)
    Ext.ClassManager.instantiate app.js:1
    Ext.ClassManager.instantiateByAlias app.js:1
    Ext.apply.factory app.js:1
    Ext.define.factoryItem app.js:1
    Ext.define.add app.js:1
    Ext.define.applyItems app.js:1
    j app.js:1
    (anonymous function) app.js:1
    Ext.define.applyActiveItem app.js:1
    (anonymous function) app.js:1
    b.implement.initConfig app.js:1
    Ext.define.constructor app.js:1
    b.implement.callParent app.js:1
    Ext.define.constructor app.js:1
    f app.js:1
    (anonymous function)
    Ext.ClassManager.instantiate app.js:1
    Ext.ClassManager.instantiateByAlias app.js:1
    Ext.apply.factory app.js:1
    Ext.define.factoryItem app.js:1
    Ext.define.add app.js:1
    Ext.define.applyItems app.js:1
    j app.js:1
    (anonymous function) app.js:1
    Ext.define.applyActiveItem app.js:1
    (anonymous function) app.js:1
    b.implement.initConfig app.js:1
    Ext.define.constructor app.js:1
    b.implement.callParent app.js:1
    Ext.define.constructor app.js:1
    f app.js:1
    (anonymous function)
    Ext.ClassManager.instantiate app.js:1
    (anonymous function) app.js:1
    Ext.application.launch app.js:1
    Ext.define.onDependenciesLoaded app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    Ext.define.loadControllerDependencies app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    Ext.define.onProfilesLoaded app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    (anonymous function) app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    Ext.define.constructor app.js:1
    f app.js:1
    b.onReady app.js:1
    Ext.apply.onDocumentReady app.js:1
    o app.js:1
    Ext.apply.onReady app.js:1
    Ext.onReady app.js:1
    g app.js:1
    Ext.define.doAddListener app.js:1
    Ext.define.changeListener app.js:1
    Ext.define.addListener app.js:1
    (anonymous function) app.js:1
    (anonymous function) app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    (anonymous function) app.js:1
    b app.js:1
    h app.js:1
    Ext.apply.factoryConfig app.js:1
    b app.js:1
    h app.js:1
    Ext.apply.factoryConfig app.js:1
    b app.js:1
    h app.js:1
    Ext.apply.factoryConfig app.js:1
    b app.js:1
    h app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    (anonymous function) app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    b app.js:1
    h app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    (anonymous function) app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    b app.js:1
    h app.js:1
    b app.js:1
    h app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    (anonymous function) app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    b app.js:1
    h app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    (anonymous function) app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    b app.js:1
    h app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    (anonymous function) app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    b app.js:1
    h app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    (anonymous function) app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    b app.js:1
    h app.js:1
    (anonymous function) app.js:1
    b app.js:1
    h app.js:1
    b app.js:1
    h app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    (anonymous function) app.js:1
    Ext.apply.require app.js:1
    (anonymous function) app.js:1
    Ext.apply.factoryConfig app.js:1
    (As the file is minified, everything is on one line; this makes it hard to debug as Chrome just gives the linenumber (1) the problem occurs on)

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3932
    Vote Rating
    1272
      0  

    Default

    Did you require the plugin?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User joostvanhassel's Avatar
    Join Date
    Jan 2012
    Location
    Rotterdam, The Netherlands
    Posts
    102
    Answers
    1
    Vote Rating
    1
      0  

    Default

    If I add 'Ext.plugin.PullRefresh' to the 'requires' property on the Application node in de project inspector, this does not solve the problem unfortunately.

    The plugin works on Chrome and on Android devices (using phonegap, just as the iOS app).

  4. #4
    Sencha User
    Join Date
    Jun 2013
    Posts
    1
    Vote Rating
    0
      0  

    Default Have same problem

    Did you find any solution? because i am facing the same problem.
    If i remove pull to refresh plugin form the list view, everything work well!

    I use sencha 2.3.0.
    Please anyone have a solution!!!!

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
  •