Where is SUPER?

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
Post Reply
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

Where is SUPER?

Post by rjpajaron »

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:

Code: Select all

CLASS SubClass INHERIT SuperClass
	PROTECT Owner AS Window
	
CONSTRUCTOR(newData AS ARRAY)

	SUPER(newData)
	
	RETURN SELF
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Where is SUPER?

Post by Chris »

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.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

Where is SUPER?

Post by rjpajaron »

Thanks Chris,

I have so much to learn... X# is not VO.
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Where is SUPER?

Post by Chris »

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.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
rjpajaron
Posts: 364
Joined: Fri Nov 06, 2015 12:01 am

Where is SUPER?

Post by rjpajaron »

Got it!

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