[squeak-dev] The Inbox: Sound-ct.69.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Wed Oct 2 06:47:38 UTC 2019


This only makes sense if both are required to construct a meaningful object. Just for convenience, it wouldn't add anything. #setString:setRuns: for Text is such a meaningful combination.

-1 :-)


Best,
Marcel
Am 01.10.2019 22:02:03 schrieb Tobias Pape <das.linux at gmx.de>:

> On 01.10.2019, at 21:49, Thiede, Christoph wrote:
>
> Hi,
>
> No special reason. Each trackInfo item describes one tracks item, so I thought it could be a good idea to set them at once. Equal to #setString:setRuns: or #real:imaginary:, for example.

I see your point. However, these two are more private (as most #set… are). The one for Complex could be even thought of as primitive and maybe this method shouldn't be necessary conceptually.

> If you don't think it improves code quality, I can abstain from it. :)

No problem, I was just wondering.
In cases where you want to communicate the _caller_ that something should be thought of as a unit, I would probably make a class-side convenience constructor.

Keep it coming :D

Best regards
-Tobias

>
> Best,
> Christoph
> Von: Squeak-dev im Auftrag von Tobias Pape
> Gesendet: Dienstag, 1. Oktober 2019 20:58:49
> An: squeak-dev at lists.squeakfoundation.org
> Betreff: Re: [squeak-dev] The Inbox: Sound-ct.69.mcz
>
> Hi
>
> I don't understand the rationale here.
> Care to explain?
> What's so different with the "dual" setter?
> Best regards
> -Tobias
> > On 01.10.2019, at 20:25, commits at source.squeak.org wrote:
> >
> > A new version of Sound was added to project The Inbox:
> > http://source.squeak.org/inbox/Sound-ct.69.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Sound-ct.69
> > Author: ct
> > Time: 1 October 2019, 8:25:38.912339 pm
> > UUID: b0d38e4d-1231-494f-8502-e1a631e232b3
> > Ancestors: Sound-eem.66
> >
> > Add convenience setter for MIDIScore
> >
> > These values are strongly related and should in most cases be set at once.
> >
> > =============== Diff against Sound-eem.66 ===============
> >
> > Item was changed:
> > ----- Method: MIDIFileReader>>asScore (in category 'chunk reading') -----
> > asScore
> >
> > ^ MIDIScore new
> > + tracks: tracks trackInfo: trackInfo;
> > - tracks: tracks;
> > - trackInfo: trackInfo;
> > tempoMap: tempoMap;
> > ticksPerQuarterNote: ticksPerQuarter;
> > source: stream localName
> > !
> >
> > Item was added:
> > + ----- Method: MIDIScore>>tracks:trackInfo: (in category 'accessing') -----
> > + tracks: trackList trackInfo: trackInfoList
> > +
> > + self tracks: trackList; trackInfo: trackInfoList.!
> >
> >



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191002/421c8207/attachment.html>


More information about the Squeak-dev mailing list