Opened 18 years ago

Closed 18 years ago

Last modified 4 years ago

#127 closed task (fixed)

Make XMB Maintain Case

Reported by: Matei Owned by:
Priority: Nice to Have Milestone:
Component: Core engine Keywords:
Cc: Patch:

Description

Currently XMB converts all element and attribute names to lower-case. It should keep them as they were in the file. We can then modify the entity or GUI code to change the JavaScript versions to camelCase.

Change History (5)

comment:1 by Matei, 18 years ago

Milestone: Multiplayer Demo

comment:2 by Matei, 18 years ago

Resolution: fixed
Status: newclosed

comment:3 by (none), 14 years ago

Milestone: Multiplayer Demo

Milestone Multiplayer Demo deleted

comment:4 by elexis, 4 years ago

r665 introduced the problem as a feature

 * Case-sensitive (but converts all element/attribute names in
   the XML file to lowercase, so you only have to be careful in
   the code)

r706 added the first bugfix to compensate for the feature
r2511 added the second bugfix and TODO
r3586 added the third bugfix

This objective of this ticket had been fixed by r4185 and r4186, however r4186 forgot to remove the feature description comment cited above.

Aisde from that all of the bugfixes (making everything lowercase everywhere) is now remaining without purpose, making the code needlessly slower (copying strings all the time) and it was planned to remove them.

From 2006-03-11-QuakeNet-#wfg-Meeting-0126.log:

16:43 <Matei> OK, well I don't really have anything to discuss; the only thing that comes to mind is the Xeromyces issue (we should make it case-sensitive at some point)

16:46 <Ykkrosh> I can't think of why it's case insensitive at the moment, except possibly so programmers can assume the names are all lowercase and don't have to check in the XML file to see what case it actually uses. But that doesn't seem like a great advantage, since you have to check how things are spelt anyway, and any errors would be immediately obvious.

16:47 <Ykkrosh> and so if you have a reason to want to preserve the case, I'd agree with changing it to do that

16:48 <Ykkrosh> and I think it should be reasonably straightforward - it'll just need all the Xeromyces-using code to start using the same case as the XML files

16:48 <Ykkrosh> so, er, all we need is to actually do the work :-P

From 2006-06-24-QuakeNet-#wfg-Meeting-0139.log:

17:38 <Matei> I remembered one thing, which is to make Xeromyces not convert elements to lower-case by default, which would be nice as we finalize the entity properties and do more entity coding; I put up a ticket on http://trac.0ad.homeip.net/ticket/127 so we don't forget

comment:5 by elexis, 4 years ago

In 23403:

Remove counterproductive lowercasing of GUI ScriptEvent names, refs #127.

r665 introduced XeroXMB lowercasing of element and attribute names as a feature.
r706, r2511, r3586 added bugfixes and TODOs because of that.
r4185, r4186 removed the XeroXMB lowercase feature.
This patch removes the lowercasing GUI bugfixes that don't fix any bug anymore while increasing code complexity and lowering performance (string copies).

Do not send mouse coordinates objects for events that do not relate to the mouse.

Store event names in static const members to:
(1) improve performance, ensuring that the CStr is not reconstructed every call,
(2) obtain compile errors when misspelling event names,
(3) allow reuse of the strings in inherited and friend classes.

Differential Revision: https://code.wildfiregames.com/D2445
Comments by Matei, Philip on 2006-03-11-QuakeNet-#wfg-Meeting-0126.log and 2006-06-24-QuakeNet-#wfg-Meeting-0139.log

Note: See TracTickets for help on using tickets.