Menu

#45 <class>: Attrib 'Programmable' not handled correctly

closed
candle (347)
2012-09-15
2004-05-07
chrisv
No

If wxs source like this

<Class Id="..." Programmable="yes"/>

gets compiled, it leads to the following entry in the
Registry table:

Registry = r[ComponentId]xx
Root=0
Key=CLSID[CLSID]\True

This is (obviously) wrong. Instead of a key
named "True", a key named "Programmable" should be
inserted:

Registry = r[ComponentId]xx
Root=0
Key=CLSID[CLSID]\Programmable

The reason for this problem is probably the following
statement in Compiler.cs, Line 538 (V 2.0.1621):

case "Programmable":
programmable = Common.IsYes(attrib.Value,
sourceLineNumbers, node.Name, attrib.Name, classId);
break;

Correct statement would be:

case "Programmable":
if (Common.IsYes(attrib.Value, sourceLineNumbers,
node.Name, attrib.Name, classId))
{
programmable = "Programmable";
}
break;

Additionally, statement in Line 710 must be changed
from:
if (programmable)
to
if (null!=programmable)

Also the type of "programmable" must be changed from
boolean to string (Line 463).

Discussion