<commit_before>Ext.require([
    'GeoExt.panel.Map',
    'GeoExt.data.PrintProvider',
    'GeoExt.plugins.PrintExtent'
]);

var mapPanel, printProvider;

Ext.onReady(function() {
    // The printProvider that connects us to the print service
    printProvider = Ext.create('GeoExt.data.PrintProvider', {
        method: "GET", // "POST" recommended for production use
        capabilities: printCapabilities, // from the info.json script in the html
        customParams: {
            mapTitle: "Printing Demo",
            comment: "This is a map printed from GeoExt."
        }
    });

    var printExtent = Ext.create('GeoExt.plugins.PrintExtent', {
        printProvider: printProvider
    });

    // The map we want to print, with the PrintExtent added as item.
    mapPanel = Ext.create('GeoExt.panel.Map', {
        renderTo: "content",
        width: 450,
        height: 320,
        layers: [new OpenLayers.Layer.WMS("Tasmania", "http://demo.opengeo.org/geoserver/wms",
            {layers: "topp:tasmania_state_boundaries"}, {singleTile: true})],
        center: [146.56, -41.56],
        zoom: 6,
        plugins: [printExtent],
        bbar: [{
            text: "Create PDF",
            handler: function() {
                // the PrintExtent plugin is the mapPanel's 1st plugin
                mapPanel.plugins[0].print();
            }
        }]
    });
    printExtent.addPage();
});<commit_msg>Replaced Ext.onReady with Ext.Application in PrintExtent example.<commit_after>Ext.require([
    'GeoExt.panel.Map',
    'GeoExt.data.PrintProvider',
    'GeoExt.plugins.PrintExtent'
]);

var mapPanel, printProvider;

Ext.application({
    name: 'PrintExtentGeoExt2',
    
    launch: function() {
            
        // The printProvider that connects us to the print service
        printProvider = Ext.create('GeoExt.data.PrintProvider', {
            method: "GET", // "POST" recommended for production use
            capabilities: printCapabilities, // from the info.json script in the html
            customParams: {
                mapTitle: "Printing Demo",
                comment: "This is a map printed from GeoExt."
            }
        });
    
        var printExtent = Ext.create('GeoExt.plugins.PrintExtent', {
            printProvider: printProvider
        });
    
        // The map we want to print, with the PrintExtent added as item.
        mapPanel = Ext.create('GeoExt.panel.Map', {
            renderTo: "content",
            width: 450,
            height: 320,
            layers: [new OpenLayers.Layer.WMS("Tasmania", "http://demo.opengeo.org/geoserver/wms",
                {layers: "topp:tasmania_state_boundaries"}, {singleTile: true})],
            center: [146.56, -41.56],
            zoom: 6,
            plugins: [printExtent],
            bbar: [{
                text: "Create PDF",
                handler: function() {
                    // the PrintExtent plugin is the mapPanel's 1st plugin
                    mapPanel.plugins[0].print();
                }
            }]
        });
        printExtent.addPage();
    }
});
{'fraction_non_alphanumeric': 0.12023270846800259, 'fraction_numerical': 0.011958629605688428, 'mean_word_length': 1.944814462416746, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2960113', 'n_tokens_mistral': 927, 'n_tokens_neox': 881, 'n_words': 216}