Hybrid View

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    0
    r_honey is on a distinguished road

      0  

    Default Problem with xtype

    Problem with xtype


    Something is very wrong at the core of handling "xtype" for custom components in Touch 2. I had earlier reported a problem here.
    Here's another tricky situation. Consider the following code:

    Script:
    Code:
    Ext.define('Ext.ux.CustomSheet', {
        extend: 'Ext.Sheet',
        xtype: 'ext.ux.customsheet'
    });		
    
    
    
    
    Ext.setup({
        		onReady: function() {
        			Ext.Viewport.add(
    				{
    					xtype: 'panel',
    					layout: 'fit',
    					items: [
    						{
    							xtype: 'toolbar',
    							docked: 'top',
    							items: [
    								{
    									xtype: 'button',
    									text: 'Click me',
    									handler: function() {
    										if (!this.sheet) {
    											this.sheet = new Ext.ux.CustomSheet({
                            defaults: {
                              xtype: 'button'
                            },
    												items: [
    													{
                                xtype: 'button',
    														text: 'Item 1',
    														handler: function() {
    															Ext.Msg.alert('', this.getText() + ' clicked.');
    														}
    													},
    													{
                                xtype: 'button',
    														text: 'Item 2',
    														handler: function() {
    															Ext.Msg.alert('', this.getText() + ' clicked.');
    														}
    													},
    													{
                                xtype: 'button',
    														text: 'Item 3'
    													}
    												]
    											});
    										}
    										this.sheet.showBy(this);
    									}
    								}
    							]
    						},
    						{
    							xtype: 'panel'
                }
    					]
    				});
        		}
        	});
    Html:

    Code:
    <!DOCTYPE html>
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Box Layouts</title>
    
    
    	<link rel="stylesheet" href="../../resources/css/sencha-touch.css" type="text/css">
    
    
    	<script type="text/javascript" src="../../sencha-touch-all.js"></script>
    	<script type="text/javascript" src="box.js"></script>
    
    
    	<style>
    	</style>
    </head>
    <body></body>
    </html>
    Please click the toolbar button 2 times in succession. You will notice that the document gets masked (for no apparent reason).

    To me, the problem looks like with the dots in xtype for the custom component: Ext.ux.CustomSheet
    Okay so, I tried to remove the dots replacing them with an underscore. Guess what, a js error is triggered as soon as I click the toolbar button.
    If I eliminate both underscores as well as dots from xtype, I still get js error on clicking the button.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Vote Rating
    750
    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


    Thank you for the report.
    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 - Sencha Touch Dev Team Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469
    Vote Rating
    13
    Jacky Nguyen has a spectacular aura about Jacky Nguyen has a spectacular aura about

      0  

    Default


    Dots are not valid characters for xtypes in Touch 2, underscores (or dashes) are perfectly fine. I can't re-produce the issue you described with PR3 build when changing your xtype to either "ext_ux_customsheet" or "ext-ux-customsheet".
    Sencha Touch Lead Architect

  4. #4
    Sencha - Sencha Touch Dev Team Jacky Nguyen's Avatar
    Join Date
    Jul 2009
    Location
    Palo Alto, California
    Posts
    469
    Vote Rating
    13
    Jacky Nguyen has a spectacular aura about Jacky Nguyen has a spectacular aura about

      0  

    Default


    Also see my explanation here.
    Sencha Touch Lead Architect

  5. #5
    Sencha User
    Join Date
    Mar 2009
    Posts
    240
    Vote Rating
    0
    r_honey is on a distinguished road

      0  

    Default


    Okay Jacky, I am gonna test it by replacing with underscors with my current PR 3 code, hopefully it would work fine as you mentioned.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar