fbpx
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?

Where is SUPER? 1 month 2 weeks ago #12417

  rjpajaron's Avatar Topic Author rjpajaron Offline Posts: 249
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? 1 month 2 weeks ago #12418

  Chris's Avatar Chris Offline Posts: 1641
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? 1 month 2 weeks ago #12422

  rjpajaron's Avatar Topic Author rjpajaron Offline Posts: 249
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? 1 month 2 weeks ago #12423

  Chris's Avatar Chris Offline Posts: 1641
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? 1 month 2 weeks ago #12425

  rjpajaron's Avatar Topic Author rjpajaron Offline Posts: 249
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