News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Error on executing using IO.Execute

Started by Lazybones, February 07, 2007, 06:44:02 PM

Previous topic - Next topic

Lazybones

Hello out there,

I want to execute a external debugger with the following code. I use IO.Execute to start the debugger. The command line is assembled in the variable executing.
The call of the program works fine, but as soon as I close the debugger GUI, an Error in CB occurs:

can't open file '' (error 3: ... )

Can anyone help me?

Thank you!
Sven

function OnMenuClicked(index)
{
  if (index == 0)
  {
    local activetarget = GetProjectManager().GetActiveProject().GetActiveBuildTarget();
    if (!IsNull(activetarget))
    {
      local outputfile = GetProjectManager().GetActiveProject().GetBuildTarget(activetarget).GetOutputFilename();
      local basepath = GetProjectManager().GetActiveProject().GetBasePath();

      local executing = _T("tricore-insight ") + basepath  + outputfile;

      IO.Execute(executing);
    }
    else
    {
      ::ShowMessage(_T("No project opened"));
    }
  }
}