On 26/10/12 12:42 AM, Yanni Chiu wrote:
I think the fix is to ensure that when I have a nil value, the
corresponding magritte description generated should be appropriate for
the situation - i.e. it should not include the attribute descriptions
that are causing the problem in the above initialization.
Yep, that fixes it, but the next problem is in:
PRComponent>>write: anObject using: aDescription
(self prototypeInstance magritteDescription includes: aDescription)
ifTrue: [ self prototypeInstance write: anObject using: aDescription ]
ifFalse: [ super write: anObject using: aDescription ] ]
Using the edit form, a nil value is set. So, correspondingly, the
magritteDescription no longer includes the dynamically generated fields.
But now the commit runs into the above code, and falls into the false
case, which fails because the PRComponent doesn't define the attribute.
Am I going about this the wrong way? Or, is this what I should expect
when messing with dynamic instance based magritte descriptions. At this
point, I think I have to specialize #write:using: in my code.
Note to anyone porting to Pier3. It all went smoothly, except for the
case above, where the custom code that handled instance based magritte
descriptions has collided with Pier3/Magritte3 take on the matter.