[moved to dabo-dev]

Ed Leafe wrote:
> On Aug 21, 2008, at 7:34 PM, Paul McNett wrote:
> 
>>> <dRadioList code-ID="dRadioList-dPanel" sizerInfo="{'HAlign':  
>>> 'Center'}"
>>> Orientation="Horizontal" Caption="Level" Value="1" Choices="[&apos; 
>>> 1&apos;,
>>> &apos;2&apos;, &apos;3&apos;, &apos;4&apos;]" Width="125"
>>> designerClass="controlMix" DataField="level" RegID="LevelField"  
>>> Height="35"
>>> DataSource="categories"></dRadioList>
>>>
>>> This is the code as generated by the ClassDesigner.  I've tried  
>>> changing
>>> &apos; to ' a few times with no change in behavior.
>> Here's the equivalent python that will help unravel the issue  
>> (actually,
>> Ed, please review, as I'm confused that some attributes seem to not
>> require embedded &apos; and others do. Specifically, is Value  
>> evaluated
>> to a string or an int?):
> 
>       All atts must be strings; that's a fact of life with XML. When  
> converted using xmltodict and applied to the class, the type of the  
> underlying property determines the type of the value.

It's ambiguous, highlighted by this case. dControlItem Values can be any 
type, including strings, so saying Value="1" in the xml is ambiguous: is 
it meant to be a string or an int?

I think I expected that if it were a string, it would show in the xml as:

Value="&quot;1&quot;"

and if it were an int, as:

Value="1"

But seeing the other properties like:

Caption="Label"

left me confused about it.

What about distinguishing between a string of "None" and a NoneType 
instance?

Paul


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to