-
13 Nov 2012 1:29 AM #1
Unanswered: Updated to Sencha Touch 2.1 - Issues
Unanswered: Updated to Sencha Touch 2.1 - Issues
Hey,
I've upgraded from Sencha Touch 2.0.3 to 2.1 in the hope that performance will be improved for the Android app I'm working on and have encountered the following issues:
-- the function setTabBarPosition() is no longer working or is extremely buggy. I am trying to move the tabBar from left to right.
-- Pull to refresh, which was working before now causes a javascript error so I have had to comment it out to get the app working. Code and error follow.
The error in this case isCode:plugins: [ { xclass: 'Ext.plugin.PullRefresh', pullRefreshText: 'Pull to refresh', refreshFn: function(plugin){ MyApp.app.story_offset = 0; MyApp.app.story_limit = 10; plugin.up().getStore().load({ params: { start: MyApp.app.story_offset, finish: MyApp.app.story_limit }, callback: function(){ Ext.each(Ext.query('.post'), function(post){ post.style.display = 'inline'; }); MyApp.app.getController('Main').updateUiColour(); Ext.ComponentQuery.query('storylistpanel button')[0].show(); } }); } } ],
Uncaught TypeError: Cannot call method 'insert' of undefined
-- I have also had to replace 'jsonpcache' with just 'jsonp' as including the former would result in build errors when attempting to run 'sencha app build package'. The error is attached as a text file (too awkward to paste in here). Text file will be pasted in next post. I cannot attach as I do not have permission.
Has anyone else here encountered these problems. My questions are:
-- Has Pull To Refresh been replaced? If so, what replaces it?
-- Has anyone encountered the same problems with jSonPCache? If so, can they be fixed?
Thanks,
Matt
-
13 Nov 2012 1:31 AM #2
Build error
Build error
[ERR] def was null
[ERR] failed to find meta class definition for name proxy.jsonpcache
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
[ERR] /private/var/www/MyApp/htdocs/MyApp/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.BasicException: java.lang.NullPointerException (<Unknown source>#461) in <Unknown source> at line number 461
[ERR] at com.sencha.exceptions.BasicException.wrap(BasicException.java:43)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:104)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:182)
[ERR] at com.sencha.ant.SenchaCommandTask.doExecute(SenchaCommandTask.java:58)
[ERR] at com.sencha.ant.BaseAntTask.execute(BaseAntTask.java:22)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:72)
[ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:87)
[ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.run(BasePluginCommands.java:91)
[ERR] at com.sencha.command.BasePluginCommands$BaseNamePathCommand.run(BasePluginCommands.java:135)
[ERR] at com.sencha.command.app.AppCommands$BuildCommand.execute(AppCommands.java:106)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.cli.Commands.dispatch(Commands.java:49)
[ERR] at com.sencha.command.Sencha.main(Sencha.java:71)
[ERR] Caused by: /private/var/www/MyApp/htdocs/MyApp/.sencha/app/build-impl.xml:126: The following error occurred while executing this line:
[ERR] /private/var/www/MyApp/htdocs/MyApp/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.BasicException: java.lang.NullPointerException (<Unknown source>#461) in <Unknown source> at line number 461
[ERR] at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
[ERR] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
[ERR] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERR] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERR] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[ERR] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:156)
[ERR] at com.sencha.ant.AntRunner.run(AntRunner.java:80)
[ERR] at com.sencha.command.ant.AntCommand.execute(AntCommand.java:75)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERR] at com.sencha.cli.Command.dispatch(Command.java:78)
[ERR] ... 31 more
[ERR] Caused by: /private/var/www/MyApp/htdocs/MyApp/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.BasicException: java.lang.NullPointerException (<Unknown source>#461) in <Unknown source> at line number 461
[ERR] at org.apache.tools.ant.util.ReflectUtil.toBuildException(ReflectUtil.java:183)
[ERR] at org.apache.tools.ant.util.ReflectUtil.throwBuildException(ReflectUtil.java:166)
[ERR] at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:110)
[ERR] at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
[ERR] at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
[ERR] at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
[ERR] at org.apache.tools.ant.taskdefs.optional.script.ScriptDef.executeScript(ScriptDef.java:350)
[ERR] at org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase.execute(ScriptDefBase.java:50)
[ERR] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[ERR] at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERR] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[ERR] at org.apache.tools.ant.Task.perform(Task.java:348)
[ERR] at org.apache.tools.ant.Target.execute(Target.java:392)
[ERR] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[ERR] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[ERR] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
[ERR] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[ERR] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
[ERR] ... 52 more
[ERR] Caused by: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.BasicException: java.lang.NullPointerException (<Unknown source>#461) in <Unknown source> at line number 461
[ERR] at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:153)
[ERR] at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.java:167)
[ERR] at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERR] at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:108)
[ERR] ... 69 more
[ERR] Total time: 12 seconds
[ERR] com.sencha.exceptions.BasicException: The following error occurred while executing this line:
/private/var/www/MyApp/htdocs/MyApp/.sencha/app/build-impl.xml:120: javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedException: Wrapped com.sencha.exceptions.BasicException: java.lang.NullPointerException (<Unknown source>#461) in <Unknown source> at line number 461
-
13 Nov 2012 5:37 AM #3
PullRefresh not supported on Ext.DataView in Sencha Touch 2.1
PullRefresh not supported on Ext.DataView in Sencha Touch 2.1
Quick update. In relation to my issues with PullRefresh not working - this is because I am using it on an Ext.dataview.DataView.
This worked fine in Sencha Touch 2.03 but it is not supported in Sencha Touch 2.1. I will have to change my dataview to a list as a result.
Hope this helps others with the same problem.
Thanks,
Matt
-
15 Nov 2012 5:51 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
- Answers
- 3107
Looks like it can't find the jsonpcache proxy. If you edit .sencha/app/sencha.cfg and add the path to the app.classpath can you build now?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.


Reply With Quote