More advanced titlebar formatting (Read 2426 times)

Started by Kuraj, March 04, 2010, 22:47:38
0 Members and 1 Guest are viewing this.
More advanced titlebar formatting |
March 04, 2010, 22:47:38
I didn't know, how to describe it in the topic name properly, but here's the idea - content put in, let's say, square brackets will only appear, if all the variables inside are present - which means, that when I want to display a contact's status and status message (which is possible in the alpha), it will look like:

Contact name - Offline ("Status message")

but when the contact has no message, it will look like

Contact name - Offline

and not like

Contact name - Offline ("").

Sorry if this had been brought up before, I hope this is possible to implement.

Re: More advanced titlebar formatting |
March 05, 2010, 00:33:24
Possible: Yes, sure, everthing is.
Will I do it: No, certainly not.

The easy fix would be a default string like "No status message" that would appear in case there is no real status message available.

Just think about it - it may appear easy to do at the first glance, but it isn't. How should the code know which characters are to be removed when a variable is empty? What if the user doesn't put quotation marks or braces around the variable? There are so many things to consider when doing this that it would require conditional statements for the title bar string and that's really out of question. Nobody writes a programming language for just formatting a title bar string :)
Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to a single instruction that doesn't work.
My SMF-based forum fork
Last Edit: March 05, 2010, 00:44:20 by Nightwish
Re: More advanced titlebar formatting |
March 05, 2010, 12:54:53
Well, your proposal floats my boat just as well :)