Welcome, Guest
Username: Password: Remember me
Visual Objects

Please use this forum to post questions about Visual Objects and Vulcan.NET
  • Page:
  • 1

TOPIC:

Class changes - Access / Assigns cannot have the same name as the protected .. 23 Sep 2021 19:09 #19686

  • JKCanada604
  • JKCanada604's Avatar
  • Topic Author


  • Posts: 43
  • Good day to you all!

    I have just stumbled into an enormous body of work due to the fact that in X# one cannot have an access / assign with the same name as a member.

    Unfortunately, all my classes written in VO use the same name for the member, the access and the assign.

    This turns out to be an enormous amount of work which I have already started.

    What I am doing is renaming the protected variables to “X_..” and then dealing with all the errors.

    Any ideas / recommendations would be really helpful!

    As always thank you, keep well and,

    Cheers, JK

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 23 Sep 2021 20:10 #19687

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3245
  • Hi John,
    unfortunately this is not a limitation of X# itself, but of the .NET Framework.
    There is another limitation: there cannot be a method and a access or assign with the same name.
    Wolfgang
    P.S. I'm using the underscore alone to distinguish my protect variables - that makes also my code easier to read because I see immediatly if a variable is a local or a protected variable
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 23 Sep 2021 20:43 #19688

    • JKCanada604
    • JKCanada604's Avatar
    • Topic Author


  • Posts: 43
  • Hi there!

    Ok - I am on exactly the same page...

    Just a lot of changes to do - not hard but tedious!

    As always, thank you, keep well and,

    Cheers, JK

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 23 Sep 2021 21:19 #19689

    • robert
    • robert's Avatar


  • Posts: 3289
  • John
    The sporter has an option to rename the variables.

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 23 Sep 2021 22:54 #19691

    • JKCanada604
    • JKCanada604's Avatar
    • Topic Author


  • Posts: 43
  • Sporter !!!!

    Where would I find such a beast?

    Thank you!

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 23 Sep 2021 23:03 #19692

    • robert
    • robert's Avatar


  • Posts: 3289
  • John,
    That was a typo.
    I meant the VOXporter.
    See www.xsharp.eu/help/example-1-the-vo-explorer-examp.html
    Enable the checkbox "CheckForIVarAndPropertyConflicts"

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 23 Sep 2021 23:34 #19693

    • Chris
    • Chris's Avatar


  • Posts: 3750
  • Robert,

    Arghh, I had completely forgotten I had implemented this in the VOXporter (after you had had suggested to do so)! I think the latest threads in the last days have given enough ideas for a "VO to X#" part 3 session...
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 24 Sep 2021 00:55 #19694

    • JKCanada604
    • JKCanada604's Avatar
    • Topic Author


  • Posts: 43
  • Wowzer!

    It worked really well!!!

    Mucho gracias!!!

    Cheers, JK

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 24 Sep 2021 05:18 #19695

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3245
  • Hi Chris,
    so I don't feel that stupid now as I had not even noted that option in the VOXporter.
    A question: do you are renaming the declaration only or also the places where it is used? (I see that a bit risky, and since I try to fix my code always on the VO side I don't think I will use this option)
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 24 Sep 2021 10:08 #19696

    • Chris
    • Chris's Avatar


  • Posts: 3750
  • HI Wolfgang,

    It adjusts also the places where it is used. I agree it is a bit risky, this is why the option is disabled by default. But in our tests I think we haven't found any problems so far.

    .
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 24 Sep 2021 12:00 #19698

    • wriedmann
    • wriedmann's Avatar


  • Posts: 3245
  • Hi Chris,
    thank you very much for this clarification!
    Wolfgang
    Wolfgang Riedmann
    Meran, South Tyrol, Italy

    www.riedmann.it - docs.xsharp.it

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 24 Sep 2021 17:43 #19703

    • robert
    • robert's Avatar


  • Posts: 3289
  • Chris,

    Chris wrote: Robert,
    Arghh, I had completely forgotten I had implemented this in the VOXporter (after you had had suggested to do so)! I think the latest threads in the last days have given enough ideas for a "VO to X#" part 3 session...

    Ok, please start preparing then ;)

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    Did you say "VO to X#" part 3 session.." 24 Sep 2021 18:01 #19704

    • JKCanada604
    • JKCanada604's Avatar
    • Topic Author


  • Posts: 43
  • Good day to you all,

    We all look forward to it!

    So far, my big migration job is going pretty well thanks to you gentlemen..

    As always, thank you and,

    Cheers, JK

    Please Log in or Create an account to join the conversation.

    Class changes - Access / Assigns cannot have the same name as the protected .. 24 Sep 2021 18:22 #19707

    • Chris
    • Chris's Avatar


  • Posts: 3750
  • robert wrote:

    Chris wrote: Arghh, I had completely forgotten I had implemented this in the VOXporter (after you had had suggested to do so)! I think the latest threads in the last days have given enough ideas for a "VO to X#" part 3 session...

    Ok, please start preparing then ;)


    Wouldn't had said it otherwise, I already am! Mentally at least :)

    .
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Last edit: by Chris.
    • Page:
    • 1