Page 1 of 1
Questions about object members lists
Posted: Sun Oct 27, 2024 6:20 am
by xinjie
Hi, everyone
I started practicing writing a class that inherits from System.Windows.Forms.Form . In the process of writing the class code, I found a problem. When I type “This.”, I see a list of members as shown below:
My question is, why doesn't it show all the members of System.Windows.Forms.Form, such as its properties, methods, etc.?
Is this a bug?
Re: Questions about object members lists
Posted: Sun Oct 27, 2024 10:23 am
by FFF
What happens, if you select "All Methods"?
Re: Questions about object members lists
Posted: Sun Oct 27, 2024 11:43 am
by xinjie
Hi, FFF
A screenshot is showing all.
I mean this list doesn't show all the members. If I need to call a method or assign a value to a property, I have to consult the documentation.
Re: Questions about object members lists
Posted: Sun Oct 27, 2024 2:57 pm
by Chris
Hi xinjie,
It's a bug, will open a ticket for this to be fixed.
I think those related problems come from the fact that in VFP all classes eventually inherit from a base "Custom" class, while in .Net all classes inherit from System.Object. In X# we need to support both cases for the VFP dialect and the DEFINE CLASS syntax, and it becomes complicated.
If you use the standard X# base syntax for defining a class (CLASS name INHERIT type) then memeber completion works as expected, but I am not suggesting that you should change your code, the problem in member completion needs to be fixed. Maybe until it's fixed, you can temporarily use the standard syntax though.
Re: Questions about object members lists
Posted: Sun Oct 27, 2024 5:11 pm
by xinjie
Hi, Chris
Thank you for confirming!