[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="['
>>> 1',
>>> '2', '3', '4']" 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
>>> ' 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 ' 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=""1""
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]