Dynamic Web Development with Seaside

Buy PDF Buy Print

3.6.7Adding Behavior

We want to be able to increment and decrement the counter, which requires two methods.

In the System Browser, select Protocol | New to add a method category for methods to update the value of count. Call the category updating. Then add these two methods:

self count: count + 1
self count: count - 1

These use the count: accessor method that was generated when the class was first created.

Copyright © 24 September 2020 Stéphane Ducasse, Lukas Renggli, C. David Shaffer, Rick Zaccone
This book is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 license.

This book is published using Seaside, Magritte and the Pier book publishing engine.