program path: Why doesn't this work?

new topic     » topic index » view thread      » older message » newer message

The following code works for EuGTK.
But not wxEuphoria.
Exact same code in both programs.

function GetPath()  -- Get the path that the program is in.
sequence cmd,path

  cmd = command_line()
  path = ""
  for stop = length(cmd[2]) to 1 by -1 do
    if cmd[2][stop] = '/' then
      path = cmd[2][1..stop]
      exit
    end if
  end for
  return path
end function  -- GetPath()
path_dmak = GetPath()


path_dmak is used where appropriate.

When I click on the wx version, it does nothing.
No error message. Nothing.

The same program works okay from the command line with ./

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu