Questions about object members lists

This forum is meant for questions about the Visual FoxPro Language support in X#.

Post Reply
User avatar
xinjie
Posts: 108
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

Questions about object members lists

Post 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:
memberslist.png
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?
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
FFF
Posts: 1589
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

Re: Questions about object members lists

Post by FFF »

What happens, if you select "All Methods"?
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
User avatar
xinjie
Posts: 108
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

Re: Questions about object members lists

Post 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.
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
User avatar
Chris
Posts: 4953
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Questions about object members lists

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

XSharp Development Team
chris(at)xsharp.eu
User avatar
xinjie
Posts: 108
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

Re: Questions about object members lists

Post by xinjie »

Hi, Chris

Thank you for confirming!
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
Post Reply