Another cardinality to think about handling would be 'set'.

Andi..

On Thu, 5 Jan 2006, 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.)

...Bryan


Ted Leung wrote:

I've been updating the del.icio.us parcel to work under 0.6 and I've run into a small problem in the detail view. The parcel wants to display a list of tags (strings) in a single text field. What attribute editor should I be using to do this? Here's a pointer to the code for the parcel, which lives in my sandbox: <http:// svn.osafoundation.org/sandbox/twl/parcels/delicious/__init__.py>

Ted
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev


_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev

Reply via email to