Silvester wrote:When I first got QMENU I couldn't figure how you could get FILE_SELECT$ to remember the last directory the user navigated to, at least without resorting to DIR_SELECT$. But found there is a very simple way, just give full pathname of last file selected. Like OPEN_DIR it just discards file name part:
...
I only mention it in the hope it encourages some authors to offer the option (Config?), as I find it a little exasperating to navigate some tortuous route only to be cast back to default directory next time

Damp cloth ready to wipe egg off face.
---
David
All part of the QL official secrets act, Silvester! The hoops we sometimes have to jump through just to achieve something fairly basic!
Was aware of this, but as it wasn't really documented afraid to use it much with QMenu in case it varied across releases (most of my programs don't use QMenu anyhow).
As you mentioned OPEN_DIR, you can achieve a lot with TK2's FNAME$ to achieve the same thing in file handling - they probably do pretty much the same thing if you drill down deep enough. Use OPEN_DIR to open a channel to a filename and FNAME$ on that channel returns the directory name part of it on a system with directories. Useful on a filename with several separators to work out which directory it came from, to separate a filename into directory and pure filename sans directory name. Most of my programs such as Q-Trans from the last few years use this.
The other David (dden) has a small set of nice and useful routines in basic to handle this, at
http://www.dilwyn.me.uk/files/dirnames.zip