The next feature added is the ability to specify a program file to load on the command line. This is specifically to support integrating the application with the OS where files with a certain extension can be associated with the application.
The CommandLine class was modified to look for a single argument that does not begin with a "-" option character if none of the other expected options were found. This argument is stored into a new file name member variable, which has an access function to get its value. The usage help message was updated for the new argument.
The MainWindow constructor was modified to check if the file name from the CommandLine instance is not empty. If it is not empty, then the current program is set to this file name overriding any in the saved settings. If this program doesn't exist or there is an error loading the program, then the application starts up blank but with the current program name set to the file specified instead of being Untitled.
[commit c8f48aa9d5]
Tuesday, January 1, 2013
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
All comments and feedback welcomed, whether positive or negative.
(Anonymous comments are allowed, but comments with URL links or unrelated comments will be removed.)