[Cuis-dev] What happened to the changed/update cycle?

Juan Vuletich JuanVuletich at zoho.com
Mon May 2 05:58:38 PDT 2022


Hi Stephen,

On 5/1/2022 3:57 PM, stephen--- via Cuis-dev wrote:
>
> Hi folks,
>
> In the original MVC as described in the BlueBook, the changed/update 
> cycle that is the core of MVC (and any other observer pattern 
> implementation in Smalltalk) was the message sequence:
>
> Any object (a model) sends
> self changed
>
> which calls, by default
> self changed: aToken
>
> which calls, by default
> self changed: aToken with: anArgument
>
> which calls, by default
> self changed: aToken with: anArgument from: aSender
>
> which was implemented as:
> self dependents do:
> [ :dep |
> dep update: aToken with: anArgument from: aSender]
>
> The dependents then implement update:with:from: or its simpler variants.
>
>
> In Squeak and descendants (I believe) this is rewritten using 
> triggerEvent: which is less flexible and not compatible.
>
> Does anyone else notice this or have apps that use the old Observer 
> pattern code?
>
> Stephen Pope
>
>
> -- 
>
>                     Stephen Travis Pope   Ojai, California, USA
> http://HeavenEverywhere.comhttp://FASTLabInc.com
> https://vimeo.com/user19434036/videos 
> http://heaveneverywhere.com/Reflections
>

I believe that Smalltalk-80 only included #changed and #changed: These 
were implemented in Squeak and derivartives like Cuis using 
#triggerEvent:, giving compatibility with Smalltalk-80. Squeak even 
includes (or used to include) a functional Smalltalk-80 style MVC.

The other methods you describe (#changed:with: and #changed:with:from:) 
are most likely only in ObjectWorks / VisualWorks. Adding compatibility 
with them seems perfectly doable.

Cheers,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
https://independent.academia.edu/JuanVuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://patents.justia.com/inventor/juan-manuel-vuletich
https://twitter.com/JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220502/28acb1f2/attachment-0001.htm>


More information about the Cuis-dev mailing list