1. #1
    Banned
    Join Date
    Mar 2012
    Posts
    30
    Vote Rating
    1
    BackgroundTeam is on a distinguished road

      0  

    Default Unanswered: Twitter Hashtag list

    Unanswered: Twitter Hashtag list


    Good morning,

    I'm trying to write a very basic hashtag list from Twitter, including the username and the text itself.

    Let's say that my query is "sencha".

    So my code is:

    Code:
    var modeloTwitter = Ext.define("modeloTwitter", {
        extend: 'Ext.data.Model',
        config: {
            fields: [
                {name: "id",                type: "int"},
                {name: "text",              type: "string"},
                {name: "from_user",         type: "string"},
                {name: "profile_image_url", type: "string"},
                {name: "created_at",        type: "string"},
                {name: "metadata"},
                {name: 'search_id'}
            ]
        }
    });
    
    
    var storeTwitter = Ext.create('Ext.data.Store', {
         storeId: "storeTwitter",
         model: "modeloTwitter",
         proxy: {
    			type: 'jsonp',
    			autoLoad: true,
             	url: 'http://search.twitter.com/search.json?q=Sencha',
    			extraParams: {
    				result_type: 'mixed'
    			},
    			reader: {
    				type: 'json',
    				rootProperty: 'results'
    			},
         },
    });
    
    
    
    
    var viewtwitter = Ext.define("abril16.view.Twitter", {
    extend: 'Ext.Panel',
    config: {
    	fullscreen: true,
    	items: [{
    		xtype: 'list',
    		store: storeTwitter,
    		itemTpl: '<b>{from_user}</b>: {text}'
    	}]}});
    But nothing happens. What could I be doing wrong?

    Thank you thank you thank you in advance.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Answers
    3541
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Try this (change in red)

    Code:
    Ext.define('abril16.view.Twitter', {
        extend : 'Ext.Panel',
        xtype  : 'twitterlist',
        
        config : {
            fullscreen : true,
            layout     : 'fit',
            items      : [
                {
                    xtype   : 'list',
                    store   : storeTwitter,
                    itemTpl : '<b>{from_user}</b>: {text}'
                }
            ]
        }
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,330
    Answers
    3541
    Vote Rating
    846
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Are you loading the store? I see you have autoLoad but it's within the proxy config, should be a config of the store.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

    When posting code, please use BBCode's CODE tags.

  4. #4
    Banned
    Join Date
    Mar 2012
    Posts
    30
    Vote Rating
    1
    BackgroundTeam is on a distinguished road

      0  

    Default


    No, it doesn't work either :-(

  5. #5
    Banned
    Join Date
    Mar 2012
    Posts
    30
    Vote Rating
    1
    BackgroundTeam is on a distinguished road

      0  

    Default


    Argh, it was actually the Autoload thing!!

    Sorry for bothering you with this, Mitchell. And thank you so much.

Thread Participants: 1

Tags for this Thread