Wolfgang Lenerz wrote: > There has been some talk on this list about some form of > "currrent directory" or "home directory" for programs that > are being executed. > > As far as I understand it, the purpose of such a directory is to > give the program the name of the directory from which the file was > executed, so that, for example, it can find a configuration or data > file in that directory. > > This facility as such doesn't exist in the QL world. > > I propose to incorporate it into SMSQE. > > The problem is one of compatibility, of course. Technically, various > solutions could be considered, such as putting it after the command > string, > but all of them will face some obstacles, such as how to get at this > from a compiled basic program. > > Concept > =-=-=-=-= > > The solution I find most acceptable, would be to create a new > "Thing". This thing would hold the home directory string, and each > job could get it from there.
Conceptually, I'm not keen on this centralised approach - it seems rather too Windows-like! Since it's an item of job-specific data, couldn't it be associated with a job-specific data area or structure (e.g. put on the stack prior to activation)? Apart from anything else, this would maintain the "self-cleaning" property of the operating system... <SNIP> > In today's everyday use, there seem to be several ways that > programs are executed. > > - Via the EX, EW etc commands, which are part of SMSQE itself. > These commands will have to be amended. > > - Via the Hotkey system. Unless a default home dir is set > up explictly, jobs set up in this way won't have a > home directory > > - Via QPAC2. This would have to be changed to send the home dir > name to the thing. > > - Via other file managers (which ones?). They would have to be > changed, too. > > If there are many of them, I might envisage creating > a new trap (#3, D0 = $3F) which takes as parameter the > name of a file & excutes it (this is a facility which > I find sorely missing from the OS as such anyway). Trap#3 functions deal with channel IDs, not device names. Shouldn't this be implemented as a vectored routine? John _______________________________________________ QL-Users Mailing List http://www.q-v-d.demon.co.uk/smsqe.htm