OK, got this to work as follows as of now Changed the second part of the code - i.e. to push the (validation) rules to the container as follows
MAAddress >> descriptionContainer "// (i.e. not descriptionEndDate) as in the document" <magritteContainer> "// (i.e. not <magritteDescription> as in the document" ^ super descriptionContainer addCondition: [ :object | (object readUsing: self descriptionEndDate) > (object readUsing: self descriptionStartDate)] labelled: 'End date must be after start date'; yourself @Stef: If you want I can send a PR but I really haven't done it before and I dont have a GH client on my machine if thats reqd - i only interact thru iceberg - if thats relevant Stéphane Ducasse wrote > probably a mistake :( send a PR when you find the solution. > >> On 26 Jan 2021, at 10:31, Sanjay Minni < > sm@ > > wrote: >> >> From pg 16 of "meta data at work with Magritte - Tutorial", Stef >> >> how are these to be entered since both method codes are in the same >> object >> and methodName >> >> MAAddress >> descriptionEndDate >> >> ^ MADateDescription new >> accessor: #endDate; >> label: 'End Date'; >> addCondition: [ :value | value > Date today ]; >> beRequired; >> yourself >> >> MAAddress >> descriptionEndDate >> >> ^ super descriptionContainer >> addCondition: [ :object | >> (object readUsing: self descriptionEndDate) > >> (object readUsing: self descriptionStartDate)] >> labelled: 'End date must be after start date'; >> yourself >> >> >> >> ----- >> cheers, >> Sanjay >> -- >> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html > > -------------------------------------------- > Stéphane Ducasse > http://stephane.ducasse.free.fr / http://www.pharo.org > 03 59 35 87 52 > Assistant: Aurore Dalle > FAX 03 59 57 78 50 > TEL 03 59 35 86 16 > S. Ducasse - Inria > 40, avenue Halley, > Parc Scientifique de la Haute Borne, Bât.A, Park Plaza > Villeneuve d'Ascq 59650 > France ----- cheers, Sanjay -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html