On Jan 5, 2006, at 2:40 PM, Bryan Stearns wrote:
Today's lesson on Theory vs Practice:
Theory: The normal picking process ought to do the right thing: if
the attribute is of type String with cardinality 'list', you ought
to get the regular StringAttributeEditor, which is supposed to
format and parse with ',' as the separator.
Practice: Having typed that, I went to look at the source code - it
looks like StringAttributeEditor.GetAttributeValue will do the
right thing with 'list' cardinality, but
StringAttributeEditor.SetAttributeValue only handles 'single'. (The
one case where we currently use something like this is the email
'toAddress' attribute, where EmailAddressAttributeEditor gets used
- it's a subclass of StringAttributeEditor that implements its own
SetAttributeValue.
I'll make StringAttributeEditor.SetAttributeValue handle the 'list'
case shortly. (Note, though, that our general strategy for dealing
with 'list' things in textctrls assumes that the strings being
edited will never contain ',' - I think this is a bad assumption,
but I don't have a fix for it.)
I'd like to see if I could get this to work using the 0.6 builds that
were distributed. Can I make this field read only or something so
that it doesn't rely on a change to
StringAttributeEditor.SetAttributeValue?
Ted
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev