Results 1 to 8 of 8

Thread: Design View crashing because of a plugin

    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha Premium Member ethraza's Avatar
    Join Date
    Jun 2007
    Location
    Brazil
    Posts
    378

    Question Design View crashing because of a plugin

    The SA Design View stopped work on me and after a little dig (because is no warning or log saying something is going bad), I found that it stopped to work because I have added a plugin to a couple form fields.
    This plugins are bound to onChange event, so why it would give the static design view headaches?

    My plugin is a field masker. It will apply any given mask to a field on change. In this particular case, the field is readOnly, so the onChange event happen just once, when I load a record to the form.


    The plugin is attached.

    Plugin use example:
    PHP Code:
    {
        
    xtype'textfield',
        
    plugins: [
            
    'maskit'
        
    ],
        
    mask'99.999.999/9999-99',
        
    fieldLabel'Remetente',
        
    name'CGC_REMET',
        
    readOnlytrue
    }, 
    Attached Files Attached Files
    LAMPE (Linux / Apache / MySQL / PHP / ExtJs)

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,488

    Default

    How are you linking in the ux?

    If you are using the .aux format the file should be loaded into the canvas and all should be fine.

    If you are just linking it in via a JS resource then it will never be loaded into the canvas. The design view will not work but it will work in the standard browser.
    Aaron Conran
    @aconran

  3. #3
    Sencha Premium Member ethraza's Avatar
    Join Date
    Jun 2007
    Location
    Brazil
    Posts
    378

    Default

    Quote Originally Posted by aconran View Post
    How are you linking in the ux?

    If you are using the .aux format the file should be loaded into the canvas and all should be fine.

    If you are just linking it in via a JS resource then it will never be loaded into the canvas. The design view will not work but it will work in the standard browser.
    Yep, I'm on the second case. I'll assume there is no workaround for that.
    Unfortunately Architect is too much restrictive. I hope it evolves in the future, so I can revisit it and maybe use in other projects.

    Thx
    LAMPE (Linux / Apache / MySQL / PHP / ExtJs)

  4. #4
    Sencha Premium Member ethraza's Avatar
    Join Date
    Jun 2007
    Location
    Brazil
    Posts
    378

    Red face

    As I need to keep editing this project and I would like to share something to the community, I'm trying to make this plugin an Architect Extension.
    But I will continue it in another post: www.sencha.com/forum/showthread.php?285850-Trying-out-my-first-aux-Form-Field-Mask



    Any way, I think Architect could load Resources to simplify things, or at least give the option to Transform a Resounce into a Extension. So here we go:

    Architect:
    • Version: 3.0.4.1386
    • Channel: 3.0.1-stable
    • Platform: 1.3.0.803
    • Cmd: 4.0.4.84
    • Framework: Ext JS 4.2.x
    Project Type:
    • ExtJS 4.2.x
    Description:
    • I added a Resource that contains a ExtJs plugin, but as Architect does not load it up, the this plugin config in some components makes the Architect canvas display nothing
    Steps to reproduce the problem:
    • Create a new project
    • Add some a resource
    • Try to use the resource content in you project
    • Crash canvas
    The result that was expected:
    • I would expect Architect to load up Resources files (JS and CSS) or at least have an option to "Transform" the selected resources into a Extension, so I can use it's content wihout crashing canvas
    The result that occurs instead:
    • The Architect canvas goes blank and does not even inform what is happening letting users in the dark (plain white actually)
    Operating System:
    • Ubuntu 12.04.4 LTS
    LAMPE (Linux / Apache / MySQL / PHP / ExtJs)

  5. #5
    Sencha User Juvs's Avatar
    Join Date
    Oct 2007
    Posts
    36

    Default Workaround...

    Same problem here... We solved using this:

    PHP Code:
    {
        
    xtype'textfield',
        
    plugins: [
            
    Ext.create('Your ClassName Plugin', {})
        ],
        
    mask'99.999.999/9999-99',
        
    fieldLabel'Remetente',
        
    name'CGC_REMET',
        
    readOnlytrue
    }, 
    Remember to convert the plugins attribute in Architect to Array !Important

    We try using an user extension with Architect, we believe that's cleaner, but we still stuck in same situation you are, trying associate the plugin with other component different from a Panel.

  6. #6
    Sencha Premium Member ethraza's Avatar
    Join Date
    Jun 2007
    Location
    Brazil
    Posts
    378

    Thumbs up

    Quote Originally Posted by Juvs View Post
    Same problem here... We solved using this:

    PHP Code:
    {
        
    xtype'textfield',
        
    plugins: [
            
    Ext.create('Your ClassName Plugin', {})
        ],
        
    mask'99.999.999/9999-99',
        
    fieldLabel'Remetente',
        
    name'CGC_REMET',
        
    readOnlytrue
    }, 
    Remember to convert the plugins attribute in Architect to Array !Important

    We try using an user extension with Architect, we believe that's cleaner, but we still stuck in same situation you are, trying associate the plugin with other component different from a Panel.
    That's awesome!

    Thank you.
    LAMPE (Linux / Apache / MySQL / PHP / ExtJs)

  7. #7

    Default

    I will have a look at your AUX today and get back to you as soon as I'm able!
    Steve Sobel
    @honestbleeps
    Sencha Architect Development Team

  8. #8

    Default

    I already replied on your other thread, but just for clarity in case anyone lands here via google: the problem is that your class needs to extend Ext.AbstractPlugin - but if you still need the functionality of Ext.util.Observable you can bring it in via a mixin.
    Steve Sobel
    @honestbleeps
    Sencha Architect Development Team

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •