Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC:

Where is SUPER? 31 Dec 2019 07:24 #12417

  • rjpajaron
  • rjpajaron's Avatar
  • Topic Author


  • Posts: 364
  • I can work without SUPER

    But when I type SUPER: it supposed to door kick a combo box like when I type SELF.

    So, let me this is valid statement:
    CLASS SubClass INHERIT SuperClass
    	PROTECT Owner AS Window
    	
    CONSTRUCTOR(newData AS ARRAY)
    
    	SUPER(newData)
    	
    	RETURN SELF
    --

    Rene Pajaron

    Please Log in or Create an account to join the conversation.

    Where is SUPER? 31 Dec 2019 10:33 #12418

    • Chris
    • Chris's Avatar


  • Posts: 3980
  • Hi Rene,

    Yes this is correct, you need to use the SUPER(<params>) syntax in order to invoke the parent constructor. If you do not supply one, the compiler will automatically include it, but the parent class needs to have a parameterless constructor for that to work.

    And yes, when you type "SUPER:" in order to access a member of the parent class, you should get a completion list.
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Where is SUPER? 31 Dec 2019 14:46 #12422

    • rjpajaron
    • rjpajaron's Avatar
    • Topic Author


  • Posts: 364
  • Thanks Chris,

    I have so much to learn... X# is not VO.
    --

    Rene Pajaron

    Please Log in or Create an account to join the conversation.

    Where is SUPER? 31 Dec 2019 15:35 #12423

    • Chris
    • Chris's Avatar


  • Posts: 3980
  • Hi Rene,

    Well, "SUPER:" is the same as in VO, isn't it? Also actually you can also use SUPER:Init() to call the parent constructor, if you also enable the vo1 compatibility option in your project, but I think it's a good idea to do it the ".Net way", using the SUPER() syntax instead.
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Where is SUPER? 01 Jan 2020 04:56 #12425

    • rjpajaron
    • rjpajaron's Avatar
    • Topic Author


  • Posts: 364
  • Got it!

    .NET Way.... to go... it means also, I have a lot to tinker.... invest on time
    --

    Rene Pajaron

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1