Uniface User Forum

 View Only
  • 1.  Version 10 - Detach from Template

    PARTNER
    Posted 06-18-2021 15:16

    I am looking to find the equivalent of 'detach from template' in UV10. I can't seem to remove the inherited from component, or change the inherited status. 

    I suspect that if I could, I'd have to copy/change all the code from the template as well. 

    Is there an option somewhere which duplicates the old function? Sometimes I want to use the template as a starting block but then change out some stuff. (Like removing panels and menus, rather than replacing them). 



  • 2.  RE: Version 10 - Detach from Template

    ROCKETEER
    Posted 06-21-2021 07:58

    Just clear the Modeled Component property, and the inherited status will change back to False.

    It's more flexible than Uniface Nine once you get used to the simplified IDE user interface: you can easily change the Modeled Component that your component inherits from (remember inheritance happens at compile-time in Uniface 10) and change other properties such as Component Type (it won't hide trigger code that doesn't apply, it just won't compile it).



  • 3.  RE: Version 10 - Detach from Template

    PARTNER
    Posted 06-21-2021 10:51

    Believe it or not, I had tried that, several times, and it kept resetting to the original value. I don't know what I did but after three or four goes just now, it successfully cleared. 

    However, this is NOT as good as the old detach template, as due to the new inheritance rules, it removes access to all the inherited code, rather than copying it into the detached component. As such, it makes it more complex to make something based on but divergent from the template behaviour. 

    So, much cut and pasting later, I am now (kind of) back to where I started and can remove the panel and popup menu, which is all I really wanted to do. 🙂