Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

RUN Command 29 Jan 2023 14:55 #25092

  • Neale
  • Neale's Avatar
  • Topic Author


  • Posts: 24
  • Hello

    Using XVIDE the RUN Command will not work, code example;
    METHOD ShowOpenReportEditor() AS VOID
    //Purpose.......: Open report RP editor.
    //Notes.........:
    RUN ReportEditor.exe

    RETURN

    Error returned;
    error XS0103: The name 'RUN' does not exist in the current context

    There is a note in the Xsharp help file;
    Note This command is defined in a header file and will be preprocessed by the X# preprocessor to a function call. If you disable the standard header (-nostddefs) files then this command will not be available. If you tell the compiler to use a different standard header file (-stddef ) then this command may also be not available.

    I have not checked 'Ignore XSharpDefs.vh' in XVIDE, but I cannot see the RUN command in the header file? Should another reference be included?

    Probably doing something wrong?

    Neale

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

    RUN Command 29 Jan 2023 17:47 #25098

    • Chris
    • Chris's Avatar


  • Posts: 3841
  • HI Neale,

    Looks like we have forgotten to implement this command, will log a bug report for this. Are you using it in a lot of places? If yes, I will send you some info how to include support for it now, but if you are only using it once or twice, I think it's better to replace the command with a call to System.Diagnostics.Process.Start() (which is what RUN will call internally anyway), which will also give you better control over the arguments and the way the process is run anyway.

    .
    XSharp Development Team
    chris(at)xsharp.eu

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

    Last edit: by Chris.

    RUN Command 29 Jan 2023 18:05 #25099

    • Neale
    • Neale's Avatar
    • Topic Author


  • Posts: 24
  • Hello Chris
    Thanks for your help, didn't think about the .net way.
    Had a quick look at System.Diagnostics.Process.Start() and as you say has a lot more control with arguments etc.

    Best
    Neale

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

    RUN Command 30 Jan 2023 11:00 #25105

    • robert
    • robert's Avatar


  • Posts: 3446
  • Neale,
    You can also try this

    _RUN("ReportEditor.exe")

    That works in VO too.

    Robert
    XSharp Development Team
    The Netherlands

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

    • Page:
    • 1