This is a migrated thread and some comments may be shown as answers.

Cannot call method 'pullHandled' of undefined

1 Answer 117 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Sasha
Top achievements
Rank 1
Sasha asked on 01 May 2012, 05:07 AM
Testing in Chrome, using Twitter feed, I am trying to test the 'pullToRefresh' functionality but get this error in Chrome developer tools when I try to pull the list down. :

  1. Uncaught TypeError: Cannot call method 'pullHandled' of undefined
    1. g.extend.refreshkendo.mobile.min.js:2346
    2. e.extend.proxy.gjquery.min.js:538
    3. y.extend.triggerkendo.mobile.min.js:136
    4. o.extend._processkendo.mobile.min.js:1681
    5. o.extend.successkendo.mobile.min.js:1664
    6. e.extend.proxy.gjquery.min.js:538
    7. p.extend.read.c.successkendo.mobile.min.js:1503
    8. f.Callbacks.njquery.min.js:590
    9. f.Callbacks.o.fireWithjquery.min.js:635
    10. f.ajaxTransport.send.d.onload.d.onreadystatechange

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
    <title>My Open Cal</title>
 
    <!-- Kendo UI Files -->
    <link href="styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery.min.js" type="text/javascript"></script>
    <script src="js/kendo.mobile.min.js" type="text/javascript"></script>
    <script>
        $( //jQuery page load
            function ()
            {
                var app = new kendo.mobile.Application($(document.body), { layout: "layout", icon: "/images/xboxavatar.png" });
                $("#ulMyCal").kendoMobileListView({
                    appendOnRefresh: true,
                    pullToRefresh: true,
                    pullTemplate: "Pull to refresh",
                    refreshTemplate: "Loading...",
                    dataSource: new kendo.data.DataSource(
                    {
 
                                transport:
                                {
                                    read:
                                    {
                                        url: "http://search.twitter.com/search.json",
                                        contentType: "application/json; charset=utf-8",
                                        type: "GET",
                                        dataType: "jsonp",
                                        data:
                                        {
                                            q: "#tampa"
                                        }
                                    }
                                },
 
                                schema: {
                                    data: "results"
                                     
                                }
                    }),
                    template:"<p>${text}</p>"
 
            });
 
        })
    </script>
</head>
<body>
 
    <!-- Layout for all views in the application, as specified when the app is created -->
    <div data-role="layout" data-id="layout">
      <div data-role="header" >
          <div data-role="navbar">
            <span data-role="view-title">My Test</span>
          </div>
      </div>
      <div data-role="footer">
          <div data-role="tabstrip">
            <a href="#index" data-icon="organize">My Calendar</a>
            <a href="#search" data-icon="search">Search</a>
            <a href="settings.htm" data-icon="settings">Settings</a>
          </div>
     </div>
    </div>
 
 
    <div data-role="view" id="index" data-title = "My Calendar">
        <div style="text-align:center">
            <ul id="ulMyCal" data-style="inset">
             
            </ul>
        </div>
    </div>
 
    <div data-role="view" id = "search" data-title = "Search">
         
    </div>
 
</body>
</html>

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 02 May 2012, 11:44 AM
Hi,

The widgets should be initialized at the view init event handler. In your case however, there is an additional limitation in the official release (which is resolved in the latest internal builds) - the pull to refresh functionality can only be used with declarative widget initialization. 

Kind regards,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView (Mobile)
Asked by
Sasha
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or