Results 1 to 4 of 4

Thread: Duplicating view does not properly copy extend properties in generated sources

    You found a bug! We've classified it as DSGNR-7600 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    69

    Default Duplicating view does not properly copy extend properties in generated sources

    Hello,

    When duplicating a view that it-self extends another view, the extend properties (for the view, viewModel and controller) are not propagated correctly to the generated code. They appears correctly in the properties panel, but not in the generated code. Please see screenshot:

    Capture2.jpg

    Sencha Architect

    Version: 4.1.1.123
    Channel: 4.1-stable
    Platform: 1.2.8.3 - win32 x64
    Renderer: 51.0.2704.106
    Cmd: 6.2.1.29
    Framework: Ext JS 6.2.x Classic

  2. #2

    Default

    What are your exact steps, please? This works for me:

    1. Create Ext 6.2 classic project
    2. Add panel component
    3. Change userClassName to BasePanel
    4. Right click on the panel in Project Inspector and select Duplicate
    5. Change userClassName to DuplicatedPanel
    6. Change extend to MyApp.view.BasePanel
    7. See the code:

    duplicated-extend.jpg

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    69

    Default

    Hello Petr,

    No the problem arises when you are duplicating a class that already extends another class. For that duplicated class, the extend property seems fine in the property panel, but not in the generated code. So from memory, the steps are the following:


    1. Create Ext 6.2 classic project
    2. Add panel component
    3. Change userClassName to BasePanel
    4. Right click on the panel in Project Inspector and select Duplicate
    5. Change userClassName to FirstPanel
    6. Change extend to MyApp.view.BasePanel
    7. Right click on the FirstPanel in Project Inspector and select Duplicate
    8. ==> this duplicate has the wrong code generated


    Please let me know if you can't reproduce it and I will try to setup a more detailled procedure to reproduce it (but I can confirm that I have reproduced this problem quite a few time)

    Cheers

    Nicolas

  4. #4

    Default

    Thanks Nicolas for clarification. I'm able to reproduce it and I created bug into our issue tracker: DSGNR-7600.

  5. #5
    Sencha User
    Join Date
    Jul 2015
    Location
    Haifa, Israel
    Posts
    2

    Default

    @petr, while you're looking into the duplication process, can you also fix derived view classes (ViewModel and ViewController) having incorrect name.
    for example, earlier you have duplicated MyApp.view.BasePanel that has MyApp.view.BasePanelViewModel and MyApp.view.BasePanelViewController.
    after the duplication, the new panel's name is MyApp.view.BasePanel1, which should have MyApp.view.BasePanel1ViewModel and MyApp.view.BasePanel1ViewController yet those classes are named MyApp.view.BasePanelViewModel1 and BasePanelViewController1 correspondingly. while it is working fine, there are side effects like renaming the viewClass doesn't rename viewModel and viewController as seen on you screenshot: the panel was renamed to MyApp.view.DuplicatedPanel yet the viewModel and viewController were untouched.

    Thanks

Similar Threads

  1. Copy/Paste all over sass sources
    By llamerr in forum Ext JS 6.x Q&A
    Replies: 2
    Last Post: 12 May 2016, 4:09 AM
  2. Replies: 1
    Last Post: 6 Feb 2014, 12:54 PM
  3. Auto generated properties of view, store and model
    By kkris1983 in forum Ext: Discussion
    Replies: 0
    Last Post: 27 Jul 2011, 12:21 AM

Posting Permissions

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