_ 1. So how do you handle the options: %ON, %OK, %OK/DIR?
_ 2. Ease of understanding and use for the user:
Handling curly braces is more complex and less understandable.
+ If you provide a phrase like: Available pattern %y %m %d %H %M.
The user will quickly understand it.
There is no possibility of user error. If they type the pattern, it will work; if not, it won't.
+ However: %DT{yyyy MM dd hh mm ss}.
This needs to be explained, or the user would end up doing things like:
%DT{yyyy MM dd hh mm ss My project},
%MyProject{yyyy MM dd hh mm ss},
%DT{yyyy}My project {MM dd hh mm ss},
_ 3. Interleaving pattern and text becomes more complicated.
_ 4. Creating a GUI would also be easier to program.
Implementing a small editor would be relatively simple with unary markers,
however, with curly braces...
(Clicking the button and/or clicking the options menu inserts the pattern into text)
_ 5. In the future, might want to include other patterns that isn't processed by QDateTime, but rather by its own processing.
Examples: Random alphanumeric, auto-incrementing number...
This isn't really a major drawback... it's just that the current mode already accounts for it.
- 1: Everything that isn't "Date" is processed.
- 2: It's deleted, leaving the result.
- 3: They are processed by QDateTime.
I've done a proof %rand, which generates a single-digit random number. If you want more digits, you just have to add more codes: %rand%rand%rand.
With the curly braces option at the end, you'd have to do something similar to do something similar to what already exists....
Reasons:
_ 1. So how do you handle the options: %ON, %OK, %OK/DIR?
_ 2. Ease of understanding and use for the user:
Handling curly braces is more complex and less understandable.
+ If you provide a phrase like: Available pattern %y %m %d %H %M.
The user will quickly understand it.
There is no possibility of user error. If they type the pattern, it will work; if not, it won't.
+ However: %DT{yyyy MM dd hh mm ss}.
This needs to be explained, or the user would end up doing things like:
%DT{yyyy MM dd hh mm ss My project},
%MyProject{yyyy MM dd hh mm ss},
%DT{yyyy}My project {MM dd hh mm ss},
_ 3. Interleaving pattern and text becomes more complicated.
_ 4. Creating a GUI would also be easier to program.
Implementing a small editor would be relatively simple with unary markers,
however, with curly braces...
(Clicking the button and/or clicking the options menu inserts the pattern into text)
_ 5. In the future, might want to include other patterns that isn't processed by QDateTime, but rather by its own processing.
Examples: Random alphanumeric, auto-incrementing number...
This isn't really a major drawback... it's just that the current mode already accounts for it.
- 1: Everything that isn't "Date" is processed.
- 2: It's deleted, leaving the result.
- 3: They are processed by QDateTime.
I've done a proof %rand, which generates a single-digit random number. If you want more digits, you just have to add more codes: %rand%rand%rand.
With the curly braces option at the end, you'd have to do something similar to do something similar to what already exists....
I think it's all drawbacks :).
Greetings