• Class extension in Dolphin

    From Vince Refiti@21:1/5 to All on Sun Mar 15 21:52:59 2020
    How do I add class extensions in Dolphin? I.e., modifying a package-specific version of a base class such as 'String' without modifying the original base version. I see them around the Dolphin codebase (i.e., Object, String, Behaviour) but I cannot find
    a way of creating them.

    Vince

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Aspinall@21:1/5 to Vince Refiti on Mon Mar 16 01:32:22 2020
    Hi Vince,

    In the Package Manager or a System Browser, right-click your package and select "Set as Default Package". Then in a Class Hierarchy Browser find the class you want to extend and create a new method. When you save your method it should be in your selected
    package. Don't forget to de-select "Set as Default Package" afterwards or all new methods will be created in your package.

    Once the extended class is visible in your package you can create additional extension methods directly in that class in a System Browser on your package.

    You can also just create methods directly in a class then move them to your own package using the "Package..." command in the method list context menu. However this marks the owning package of the class as dirty/changed.

    Hope this helps,

    John


    On Monday, March 16, 2020 at 4:53:00 AM UTC, Vince Refiti wrote:
    How do I add class extensions in Dolphin? I.e., modifying a package-specific version of a base class such as 'String' without modifying the original base version. I see them around the Dolphin codebase (i.e., Object, String, Behaviour) but I cannot
    find a way of creating them.

    Vince

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Vince Refiti@21:1/5 to All on Mon Mar 16 18:41:51 2020
    Thank you very much again John. That worked.

    I actually stumbled on it earlier but I thought it was some kind of bug as it caused circular references in packages dependencies I was working on. Now I know why.

    Vince

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)