Welcome, Guest
Username: Password: Remember me
Visual Objects

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

TOPIC:

Type Conversion from Vulcan.__Array to XSharp.__Array 16 Mar 2022 09:09 #21952

  • fpm
  • fpm's Avatar
  • Topic Author


  • Posts: 2
  • Hello,

    is there a way to convert a Vulcan.__Array to an XSharp.__Array in XSharp?

    I tried:
    xs_array := (ARRAY)vn_array
    but that results in a compiler error
    Cannot convert type 'Vulcan.__Array' to 'ARRAY'

    Thanks for any suggestions.

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

    Type Conversion from Vulcan.__Array to XSharp.__Array 16 Mar 2022 09:32 #21953

    • Chris
    • Chris's Avatar


  • Posts: 3750
  • Well, you could write a function that creates a new X# array and simply copies the elements of the vulcan array to the X# one, but is it really necessary to do all this? Can you tell us why you need to mix both array types? Maybe we could suggest a better way to do what you need to achieve.

    .
    XSharp Development Team
    chris(at)xsharp.eu

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

    Type Conversion from Vulcan.__Array to XSharp.__Array 16 Mar 2022 10:24 #21955

    • fpm
    • fpm's Avatar
    • Topic Author


  • Posts: 2
  • Thank you, Chris.

    We are about to migrate a project from Vulcan to XSharp. We are using Vn2Ado, but Vn2Ado is using Vulcan.__Array. So we are getting a lot of compiler errors now. e.g:
    Cannot apply indexing with [] to an expression of type 'Vulcan.__Array'

    We are also getting further errors, because array functions like ALen() and so on are referring to Xsharp Alen() functions and would have to be rewritten as VulcanRtFuncs.Functions.Alen() to refer to the corresponding Vulcan function.

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

    Last edit: by fpm.

    Type Conversion from Vulcan.__Array to XSharp.__Array 16 Mar 2022 10:40 #21956

    • Chris
    • Chris's Avatar


  • Posts: 3750
  • I think it will be way less complicated, if you just use the X# version of Robert's tool instead. I'm sure he will step in here or you can contact him directly for a X# license.

    ..
    XSharp Development Team
    chris(at)xsharp.eu

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

    Type Conversion from Vulcan.__Array to XSharp.__Array 16 Mar 2022 14:31 #21959

    • robert
    • robert's Avatar


  • Posts: 3289
  • Frank,
    You already have download rights to the Xs2Ado installers on this website.
    I recommend that you download Xs2Ado instead of Vn2Ado from this location:
    www.xsharp.eu/itm-downloads?folder=thirdparty%252Fxs2ado
    Version 5.0.5 is the recommended version.

    Robert
    XSharp Development Team
    The Netherlands

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

    • Page:
    • 1