Results 1 to 2 of 2

Thread: User Extension not render in Architect 3.5

  1. #1
    Sencha User
    Join Date
    Mar 2016
    Posts
    9
    Answers
    3

    Default Answered: User Extension not render in Architect 3.5

    So here is the problem... I have developed a number of assets outside of Sencha architect, specifically in Sencha ExtJS 6.0.1 using web storm and I now want to import them into Sencha Architect as user extensions. So after a little bit of adjustment I managed to create a user extension according to the help and architect successfully import my extension with a single widget based on Ext.Component. So far so good... well it kind of went a bit bumpy from here. I managed to get the extension to display inside the toolbox, together with the widget, but when I attempted to drag and drop it into a container on the initial view, the control was not rendered, in fact the parent, namely a standard panel, simply disappeared and would not reappear until firstly I removed my widget and then rebooted architect ??? Although without the design view rendering Architect did not complain and built the entire solution without errors. It also allowed me to preview it inside Chrome ??? The problem is one of rendering inside the canvas in the designer (kind of the whole point of architect, otherwise I would simply use VS). Any ideas ? So just to confirm what does work...
    1. User Extension imports correctly
    2. Toolbox is populated as expected, including new extension and widgets (only have the one at the moment)
    3. Drag and drop works to a point, the widget is added to the container
    4. The solution builds without any bugs
    5. The solution can be previewed inside Chrome with full rendering

    The problem is it is simply not rendering inside the canvas of the designer, all I actually have is a panel inside the main window which displays until I drop my widget inside it then nothing !!! Please help, we need this feature... Regards

  2. Ok so the problem appeared to be in the way the I needed to inherit from a custom class and in the way the package.json was constructed.

    The way I found that worked was to add all required files in the order that they where required to the js section of the corresponding class definition.

    So within the package.json it may look like this

    {
    "definition": "myWidget.Definition.js",
    "className": "myExtension.myassets.myWidget",
    "js": [
    "myassets/MySingletonClass1.js",
    "myassets/MySingletonClass2.js",
    "myassets/MyWidgetViewModel.js",
    "myassets/MyWidgetController.js",
    "myassets/MyWidgetControllerC.js",
    "myassets/MyWidgetViewC.js"
    ],
    "css":[]
    }

    To explain the above a little...
    • MyWidgetViewC is a custom widget extends Ext.Component, it requires MyWidgetControllerC and MyWidgetViewModel.
    • MyWidgetControllerC extends MyWidgetController and requires nothing
    • MyWidgetViewModel extends Ext.app.ViewModel and requires nothing
    • MyWidgetController extends Ext.app.ViewController, but also requires MySingletonClass2, which in turn requires MySingletonClass1.
    So all dependencies are included across the entire hierarchy, my thinking is that this is not necessary and Sencha should make this thing clearer.

    The corresponding Def file for MyWidget would look like this

    {
    "classAlias": "widget.MyWidgetViewC",
    "className": "myExtension.myassets.MyWidgetViewC",
    "inherits": "Ext.Component",
    "autoName": "MyWidget",
    "toolbox":{},
    "configs": []
    }

    Additionally the level of debug info for this sort of thing is really bad from Architect, in some instances when this was wrong it would go so far as to crash the design view without notifying the user. The lack of feedback for the developer was appalling. Please sort this out Sencha.

  3. #2
    Sencha User
    Join Date
    Mar 2016
    Posts
    9
    Answers
    3

    Default Sencha needs to make things clearer

    Ok so the problem appeared to be in the way the I needed to inherit from a custom class and in the way the package.json was constructed.

    The way I found that worked was to add all required files in the order that they where required to the js section of the corresponding class definition.

    So within the package.json it may look like this

    {
    "definition": "myWidget.Definition.js",
    "className": "myExtension.myassets.myWidget",
    "js": [
    "myassets/MySingletonClass1.js",
    "myassets/MySingletonClass2.js",
    "myassets/MyWidgetViewModel.js",
    "myassets/MyWidgetController.js",
    "myassets/MyWidgetControllerC.js",
    "myassets/MyWidgetViewC.js"
    ],
    "css":[]
    }

    To explain the above a little...
    • MyWidgetViewC is a custom widget extends Ext.Component, it requires MyWidgetControllerC and MyWidgetViewModel.
    • MyWidgetControllerC extends MyWidgetController and requires nothing
    • MyWidgetViewModel extends Ext.app.ViewModel and requires nothing
    • MyWidgetController extends Ext.app.ViewController, but also requires MySingletonClass2, which in turn requires MySingletonClass1.
    So all dependencies are included across the entire hierarchy, my thinking is that this is not necessary and Sencha should make this thing clearer.

    The corresponding Def file for MyWidget would look like this

    {
    "classAlias": "widget.MyWidgetViewC",
    "className": "myExtension.myassets.MyWidgetViewC",
    "inherits": "Ext.Component",
    "autoName": "MyWidget",
    "toolbox":{},
    "configs": []
    }

    Additionally the level of debug info for this sort of thing is really bad from Architect, in some instances when this was wrong it would go so far as to crash the design view without notifying the user. The lack of feedback for the developer was appalling. Please sort this out Sencha.

Similar Threads

  1. User extension is not rendered on canvas in Architect
    By nikolaich in forum Sencha Architect 3.x: Q&A
    Replies: 5
    Last Post: 16 Jul 2015, 8:08 PM
  2. User extension is not appear on toolbox in Architect
    By GonzaloEMarin in forum Sencha Architect 3.x: Q&A
    Replies: 1
    Last Post: 16 Jun 2015, 2:47 PM
  3. User extension is not appear on toolbox in Architect
    By GonzaloEMarin in forum Sencha Architect User Extensions/Templates
    Replies: 0
    Last Post: 1 Jun 2015, 1:54 PM
  4. Anybody interested in a Parse.com user extension for Architect?
    By ccg in forum Sencha Architect User Extensions/Templates
    Replies: 0
    Last Post: 5 Jun 2014, 10:16 AM
  5. User Extension Inheritance in Sencha Architect 3
    By reproman in forum Sencha Ext JS Q&A
    Replies: 5
    Last Post: 6 Mar 2014, 11:32 AM

Tags for this Thread

Posting Permissions

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