28 Jun 2011 6:09 AM #11
YES! This is the piece I was missing. Between your post and then looking at the added script tag in the dom explorer and realizing the number is still tacked on to the function name, that solves my issue. I wish this had been more clearly documented on the scripttag page as it would've saved some time. And yeah, I'm using scripttag since I'm using a store and will eventually be wrapping this in Phonegap. I used Phonegap last year as well to wrap a jqTouch application, but felt rather dubious about jqTouch after the final result was produced.
And yes, now that I know this, the Views Datasource module will only work if I modify the template, which is a couple of lines to change.
You've been so helpful on this... one of the next steps I'm going to be challenged with is pushing user data to the server from the phone. Any suggestions, tips, tricks there? I imagine I will have to send a json object to the server and am contemplating using Drupal's services API for that along with the JSON Server addon. Your thoughts?
5 Jul 2011 6:35 AM #12
I have the very same problem, but I don't know which lines to change in the views datasource module.
Could you help me?
5 Jul 2011 6:39 AM #13
Cool to see someone else going after Drupal and Sencha! Yeah... just copy/paste the views-views-json-style-exhibit.tpl.php from the datasource module to your theme.
Then edit the copy and add this to the start of the last "else" statement:
echo $_REQUEST['callback'] . '(';
Also add this right before the "exit" statement:
Make sure your view is being delivered as "application/json" in the view settings.
5 Jul 2011 6:57 AM #14
At the beginning it was not working cause I had not "MIT Simile/Exhibit" selected, but "simple". Now I changed and.. the error vanished!
Great! you are my hero!
Well, not only we are both working with drupal/sencha, but we both came from drupal/jqTouch !
I dropped jqTouch cause it is not working with phonegap when I try to use it for Android and BlackBerry. With iOS jqTouch it worked quite well instead!
Thanks a lot dude!
5 Jul 2011 7:04 AM #15
I had a lot of problems with jQtouch. There was no graceful way for handling data built in, and getting scrolling to work was a pain. Sam Shull's plugin helped a lot with that. Also, it seems that there was a lot of DOM bloat and nothing was ever really destroyed so the app turned out to be a lot slower, even on iOS. This is not to be ungrateful for jQTouch as it was a great starting point and a good free tool.
I never tried jQTouch on Android or Blackberry, but you just confirmed to me that Sencha is right for my current project.
5 Jul 2011 7:13 AM #16
yes, it was a great starter indeed! I began with the Jonathan Stark book about we applications for iPhone, otherwise I would have to learn Objective C, that I'd like, but I don't have the time.
Sencha Touch, even if has a steeper learning curve (I got mad for building CSS with ruby, compass etc..) is looking far better until now!
I'm sending you my email as a private msg, in case we would want to ecxhange some other issues.
Ciao from Rome, Italy!
5 Jul 2011 7:31 AM #17
I also use Drupal but I haven't had to integrate Sencha yet. I'm glad I could help in this thread, but I'll also be bookmarking it for epiphanydigital's posts when I need to do it in the future.
Ciao Adriano, me ha fatto un piacere di vedere uno da Roma che sta usando Sencha. Forza La Magica!
5 Jul 2011 7:36 AM #18
I'm a little anxious/concerned about getting this setup to work when I need to send data to Drupal. I think the options are build a custom module or use the Services API module with the JSON Server module, and hack it as is mentioned here (http://drupal.org/node/791922) to allow for JSONP usage.
I will be using Drupal as a way to sync across multiple client devices... so if a person has an android, and ipad, and blackberry (not that i can think of reason for anyone having all of those!) they can sync their user data in the background.
5 Jul 2011 7:43 AM #19
It looks like I may have been incorrect earlier when I said that JSONP was necessary when packaging apps with phonegap. It seemed logical to me that it would be, but in this thread Steve1964 points out that there should be no cross domain issues: http://www.sencha.com/forum/showthre...astore-loading)
5 Jul 2011 7:45 AM #20
I know that's true with iOS, but I'm not sure that it holds true on other devices.