Page 1 of 1

Minor documentation improvements

Posted: Wed Feb 15, 2017 12:23 pm
by Robert
I always thought that when using the routine Files.File.Register that the name parameter should exclude the extension. Writing the code to find the last '.' and stripping off the rest is a bit tedious, and this morning I left it out. To my surprise there was no problem.

So:
1 - Should the name include / exclude the extension?
2 - What happens if the extension is not consistent with the type parameter?
3 - Should the Docu be improved to clarify these answers?

Robert

Re: Minor documentation improvements

Posted: Wed Feb 15, 2017 1:55 pm
by Josef Templ
My guess is that this behavior was different for Windows and MacOS.
Therefore it has not been specified.

Now we have Windows only and we could probably specify it.
May be with a hint that this applies to Files.stdDir (i.e. Windows file system interface),
since Files.dir is exchangeable in principle.

The precise behavior seems to come from HostFiles.Append.
Properties to consider are: type is empty, filename (without any path) contains dot;
or something like that.

Note that when you use File->Save As... there are additional rules applied
before calling Register (I guess this is done inside the Windows file dialog).

- Josef