[squeak-dev] What are the current use cases for traits? (was: The Inbox: TraitsTests-pre.19.mcz)

Marcel Taeumel marcel.taeumel at hpi.de
Sun Mar 31 08:47:07 UTC 2019


Hi, there.

I use traits to describe the expected view interface in Vivide (github.com/hpi-swa/vivide):
https://github.com/hpi-swa/vivide/tree/master-squot/repository/Vivide.package/TViObjectView.trait

There are other traits in Vivide to make protocols explicit:
https://github.com/hpi-swa/vivide/tree/master-squot/repository/Vivide.package/TViDrawFlags.trait
https://github.com/hpi-swa/vivide/tree/master-squot/repository/Vivide.package/TViMemento.trait
https://github.com/hpi-swa/vivide/tree/master-squot/repository/Vivide.package/TViObjectNotifier.trait
https://github.com/hpi-swa/vivide/tree/master-squot/repository/Vivide.package/TViObjectViewReset.trait
https://github.com/hpi-swa/vivide/tree/master-squot/repository/Vivide.package/TViObjectViewSupport.trait
https://github.com/hpi-swa/vivide/tree/master-squot/repository/Vivide.package/TViOverlayMessages.trait

Best,
Marcel
Am 31.03.2019 04:54:26 schrieb David T. Lewis <lewis at mail.msen.com>:
Changing the subject line to focus on Levente's question.

On Thu, Mar 28, 2019 at 06:43:11PM +0100, Levente Uzonyi wrote:
>
> What are the current use cases for traits?

In order to experiment with Git based repositories, I have loaded the
Tonel package from the github repositories of Jakob Reschke.

Installer ensureRecentMetacello.
(Smalltalk classNamed: #Metacello) new
repository: 'github://j4yk/tonel:squeak';
baseline: 'Tonel';
load.

This brings in the FS-AnsiStreams package, which uses traits.

Having traits in Squeak allows me to load this package.

Dave


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190331/74602be3/attachment.html>


More information about the Squeak-dev mailing list