Minor documentation improvements

Post Reply
User avatar
Robert
Posts: 1024
Joined: Sat Sep 28, 2013 11:04 am
Location: Edinburgh, Scotland

Minor documentation improvements

Post 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
User avatar
Josef Templ
Posts: 2047
Joined: Tue Sep 17, 2013 6:50 am

Re: Minor documentation improvements

Post 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
Post Reply