[Dev] Re: mixinAClass vs Query
twl at osafoundation.org
Mon Jun 14 13:42:12 PDT 2004
As far as the query part of the discussion goes, I'm not sure what Donn
is saying that queries don't return enumeration values. The Query
class that we have today doesn't, but there's no reason why a query
shouldn't be able to return any attribute value of an item, even if the
type of the attribute is Enum. That aside, I'm not sure that you'd
necessarily want to use a query to do what you are discussing here. If
you could imagine writing a query that returns all Blocks that have a
particular (Enumeration) attribute value, then that would be (in my
opinion) an appropriate use of a query.
On Jun 11, 2004, at 12:53 PM, John Anderson wrote:
> Very interesting.
> I think it would be quite useful to have an AttributeBlock that just
> desplays any attribute and presents the appropriate U/I for whatever
> type the attribute happens to be. I think that's what I'm going to
> want for editing elements of the summary view. I like the idea getting
> away from specific kinds of blocks and replacing them with a more
> general purpose block, which might choose a natural default based on
> the type of attribute, but also have a style attribute which forces
> how the data is presented. This sounds so cool it makes me want to go
> write it :-)
> Donn Denman wrote:
>> It occurs to me that the mixinAClass/Attribute approach of attaching
>> behavior to Blocks acts a little like a query, in that it populates
>> the block, but appears to be much more flexible. For instance, I'd
>> like to make a ComboBoxAttribute block that points to an Attribute
>> whose value is an Enum. It would populate the ComboBox from the
>> different values available in the Enumeration, and select the current
>> value held by the Attribute. I don't think you can do this with a
>> query, since Enumeration values are not returned by queries.
>> I think in the long run we want a more general AttirbuteBlock that
>> looks at the type of the attibute to be displayed, and then takes on
>> the actual block kind appropriate for that attribute. If the
>> attribute was a boolean, it would present a check box. String
>> attributes would be displayed in static or edit text blocks.
>> Comboboxes for Enumerations, etc.
>> Just food for thought. I think I'm going to plow ahead with the
>> MarkupBar while we ponder AttributeBlocks.
>> - Donn
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> Open Source Applications Foundation "Dev" mailing list
Ted Leung Open Source Applications Foundation (OSAF)
PGP Fingerprint: 1003 7870 251F FA71 A59A CEE3 BEBA 2B87 F5FC 4B42
More information about the Dev