Sean,

Perhaps I am misunderstanding and solving a different problem.. but it sounds like... **if** all of these instances actually store the date...

Seems to me the Parent instance #date methods should be accessed using simple method accessors of a Magritte Date description. The tricky part of model integrity should be logic of the instances of Parent and not dependent on the Magritte description -- with myriad good reasons to make exceptions. e.g. "I just need to meet the deadline or else i am fired!"

The tricky part, can be solved by either having the parent always push data down (with direct wiring) or registering self as a dependent, or the children as dependents; or the other major option is that of having the children pull it on demand (e.g. ifNil: [ date := parent date]).

-
You probably want simple methods for your parent object that push the date to children.
e.g. define something like...

#updateChildrenStates
    self children do: [:child | child date: self date. ... ]

Whether you use #changed/#update/dependency-management or announcements, or "direct wiring" with this approach is up to you.

If using #changed you would do something like this (as well as register self as a dependent):

Parent >>date: aDate
    date := aDate asDate.
    self changed: #date.

and Parent >> 
#update: aSymbol
    self updateChildrenStates

*if* the child is registered as a dependent but has no handle to the parent, implement:
Parent >>
update: aSymbol with: anObject
    aSymbol == #date ifTrue: [ self date: anObject date ].

-
Or, if using "direct wiring"
Parent >> date: aDate
    date := aDate asDate.
    self updateChildrenStates. "or more specifically self updateChildrenDates"

--
If on the other hand, the children are pulling, then they need a handle on the parent to query lazily. 
 
Good luck!
Cam


On Tue, Oct 8, 2013 at 6:51 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Thanks for the detailed response!


Cameron Sanders wrote
> Is this a presentation problem/question or a model
> integrity problem/issue?

It's a model integrity issue. In my model parent objects hold a collection
of objects of mixed types that all have a date field which should be set to
the same value as parent's date, so e.g.:

aParent
  - date: 1/1/2013
  - toMany: {
    - anObject
      - date: 1/1/2013
    - anInstanceOfADifferentClass (polymorphic wtr date access)
      - date: 1/1/2013 }



-----
Cheers,
Sean
--
View this message in context: http://forum.world.st/Default-depending-on-container-tp4712877p4713331.html
Sent from the Magritte, Pier and Related Tools mailing list archive at Nabble.com.
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki