On Thu, 2005-04-21 at 00:11 +0200, Thomas Dudziak wrote:
> > test runs now
> 
> Great work! Will surely help me a lot.

great

> > fixed a couple of small things: need to match on singular property type
> > in the test for polymorphism. (possible may need to add an extra null
> > test and then check property type in some cases. no time to create unit
> > tests to prove or disprove this now.) also, tweaked the element name
> > matching code in the property descriptor.
> 
> What do you mean with singular property type ? A common base type
> different from Object ?

(one of the other problems with betwixt is that some of the basic
descriptor concepts are not as well described as they might be. a number
of these predate my involvement and so though i know how they're used,
i'm sometimes a little hazy about their original design purpose.)

it's to do with collectives (like collections and maps). it gives the
type of the elements contained in the collective. (the property type
will contain the actual collective type.) 

one of the weaknesses of the way that betwixt does descriptors is that
there's no way to indicate a link in the object graph without
associating an element. that makes things more complex. 

> 
> > an important thing to remember is that betwixt (right or wrong) does not
> > assign adders automatically when using a dot betwixt file. you need to
> > either use addDefaults or add an updater property. this behaviour has
> > been like this for a while and is a FAQ. maybe it needs changing but
> > that then there'd be no way to indicate no updater should be used.
> 
> Mhmm, this auto-determination of an adder/updater would be really nice
> to have. What's the reason somebody want's no updater ? If this is for
> read-only properties, then some property like "readonly" might do ?

this behaviour has been around longer than i can remember. i can't think
of any reason why anyone wouldn't want an updater unless the property is
read-only. adding a read-only property and automatically finding
updaters sounds like a much better idea :)

> Btw, does this new reference/collection behaviour affect the addDefaults 
> stuff ?

shouldn't do. addDefaults really just runs the generic introspection
stuff to fill in anything property left unmatched. could do with a unit
test to prove it, though...

- robert


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to