Private fields are shown in the XIDE code editor popup

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
Irwin
Posts: 81
Joined: Wed Mar 23, 2022 10:24 am
Location: España

Private fields are shown in the XIDE code editor popup

Post by Irwin »

Hi Chris,

I just realized XIDE's code editor popup is showing the classes's private fields. That is supposed to happen?

Image

thanks.
User avatar
Chris
Posts: 4986
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Private fields are shown in the XIDE code editor popup

Post by Chris »

Hi Irwin,

If the method you are writing code in is part of this class, then it is correct, even if you are using a local to hold an instance of the class. If it's code outside the class, then it is a bug, can you please give me a sample that I can reproduce the problem?
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Irwin
Posts: 81
Joined: Wed Mar 23, 2022 10:24 am
Location: España

Re: Private fields are shown in the XIDE code editor popup

Post by Irwin »

Chris wrote: Fri Nov 22, 2024 12:08 am Hi Irwin,

If the method you are writing code in is part of this class, then it is correct, even if you are using a local to hold an instance of the class. If it's code outside the class, then it is a bug, can you please give me a sample that I can reproduce the problem?
Hi Chris, the code shown belongs to another file outside of the class who has the private fields, in this case then they should not be shown in the popup right? Create a class with some private fields (and some publics for variety), put it in a separate namespace eg: sample.privateclass and then create another separate file including a separate namespace eg: sample.clientclass and just instanciate the class and show its fields.

If you still need my examples I will send them to you privately.

thanks.
User avatar
Chris
Posts: 4986
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Private fields are shown in the XIDE code editor popup

Post by Chris »

Hi Irwin,

Unfortunately I did not manage to reproduce this, so yes please send me a sample. You can also create a test new project, create an app (or is it two needed?) in it with simple test code that shows the problem and just export it and send me the .xipef (export) file.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Irwin
Posts: 81
Joined: Wed Mar 23, 2022 10:24 am
Location: España

Re: Private fields are shown in the XIDE code editor popup

Post by Irwin »

Chris wrote: Fri Nov 22, 2024 9:29 am Hi Irwin,

Unfortunately I did not manage to reproduce this, so yes please send me a sample. You can also create a test new project, create an app (or is it two needed?) in it with simple test code that shows the problem and just export it and send me the .xipef (export) file.
I restarted my XIDE and the issue is not happening anymore. :o I think this happened because those fields were public in the beginning and I changed them to private, but XIDE did not refresh the class template or anything. That's ok.

thanks.
User avatar
Chris
Posts: 4986
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Private fields are shown in the XIDE code editor popup

Post by Chris »

Irwin wrote: Fri Nov 22, 2024 11:34 am
Chris wrote: Fri Nov 22, 2024 9:29 am Hi Irwin,

Unfortunately I did not manage to reproduce this, so yes please send me a sample. You can also create a test new project, create an app (or is it two needed?) in it with simple test code that shows the problem and just export it and send me the .xipef (export) file.
I restarted my XIDE and the issue is not happening anymore. :o I think this happened because those fields were public in the beginning and I changed them to private, but XIDE did not refresh the class template or anything. That's ok.

thanks.
Ah, OK, that explains it then. XIDE reads the members of the classes directly from the exe/dll files (not from the code), so after you make such a change, you need to recompile for intellisense to see them.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Irwin
Posts: 81
Joined: Wed Mar 23, 2022 10:24 am
Location: España

Re: Private fields are shown in the XIDE code editor popup

Post by Irwin »

Chris wrote: Fri Nov 22, 2024 11:36 am
Irwin wrote: Fri Nov 22, 2024 11:34 am
Chris wrote: Fri Nov 22, 2024 9:29 am Hi Irwin,

Unfortunately I did not manage to reproduce this, so yes please send me a sample. You can also create a test new project, create an app (or is it two needed?) in it with simple test code that shows the problem and just export it and send me the .xipef (export) file.
I restarted my XIDE and the issue is not happening anymore. :o I think this happened because those fields were public in the beginning and I changed them to private, but XIDE did not refresh the class template or anything. That's ok.

thanks.
Ah, OK, that explains it then. XIDE reads the members of the classes directly from the exe/dll files (not from the code), so after you make such a change, you need to recompile for intellisense to see them.
Understood, thank you my friend!
Post Reply