[squeak-dev] The Inbox: MorphicExtras-ct.263.mcz

Chris Muller asqueaker at gmail.com
Mon Sep 9 23:21:14 UTC 2019


Hi Christoph,

Thanks for regarding the ancestry as an important part of the code model
too.  It absolutely is.  If your question is about the break in
consecutiveness, it's absolutely fine, not a problem at all.

Overall, what is important, IMO, is to do our best to keep the ancestry as
meaty and meaningful as we can.  Whether Dave designed it for this purpose
or not, the new "Reparent" function on the Repository browser is very
useful to employ before committing Inbox items for which feedback has been
received, to trunk.  By reparenting to the original trunk version, the
whole logical change is captured into one commit instead of spread across
multiple commits.  If not, though, its just be sure every one of those
interim version of the ancestry is present in the same repository,
otherwise the tools will produce errors when diffing those versions...

Best,
  Chris





On Sat, Sep 7, 2019 at 5:51 AM Thiede, Christoph <
Christoph.Thiede at student.hpi.uni-potsdam.de> wrote:

> See HTML below, is that ancestry a problem?
>
>
> Please also note I moved the FRMorph from the fun to the tools parts
> bin category. Would you agree with that?
>
> ------------------------------
> *Von:* Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im
> Auftrag von commits at source.squeak.org <commits at source.squeak.org>
> *Gesendet:* Samstag, 7. September 2019 12:44 Uhr
> *An:* squeak-dev at lists.squeakfoundation.org
> *Betreff:* [squeak-dev] The Inbox: MorphicExtras-ct.263.mcz
>
> A new version of MorphicExtras was added to project The Inbox:
> http://source.squeak.org/inbox/MorphicExtras-ct.263.mcz
>
> ==================== Summary ====================
>
> Name: MorphicExtras-ct.263
> Author: ct
> Time: 7 September 2019, 12:35:29.653698 pm
> UUID: 7205ede8-7f4d-3842-bb5f-01738abfc5cb
> Ancestors: MorphicExtras-ct.262
>
> Switch from preamble to postscript and from DateAndTime to TimeStamp
>
> =============== Diff against MorphicExtras-mt.260 ===============
>
> Item was changed:
>   StringMorph subclass: #FrameRateMorph
> +        instanceVariableNames: 'lastDisplayTime framesSinceLastDisplay
> updateInterval mSecsPerFrame framesPerSec'
> -        instanceVariableNames: 'lastDisplayTime framesSinceLastDisplay'
>          classVariableNames: ''
>          poolDictionaries: ''
>          category: 'MorphicExtras-Demo'!
>
> Item was changed:
>   ----- Method: FrameRateMorph class>>descriptionForPartsBin (in category
> 'parts bin') -----
>   descriptionForPartsBin
>          ^ self partName:        'FrameRate' translatedNoop
> +                categories:             {'Tools' translatedNoop}
> -                categories:             {'Just for Fun' translatedNoop}
>                  documentation:  'A readout that allows you to monitor the
> frame rate of your system' translatedNoop!
>
> Item was added:
> + ----- Method: FrameRateMorph>>framesPerSec (in category 'accessing')
> -----
> + framesPerSec
> +
> +        ^ framesPerSec!
>
> Item was changed:
>   ----- Method: FrameRateMorph>>initialize (in category 'initialization')
> -----
>   initialize
>   "initialize the state of the receiver"
>          super initialize.
>   ""
> +        lastDisplayTime := DateAndTime new.
> -        lastDisplayTime := 0.
>          framesSinceLastDisplay := 0.
> +        self updateInterval: 500 milliSeconds.
>          self font: (Preferences standardMenuFont emphasized: 1).
>   !
>
> Item was added:
> + ----- Method: FrameRateMorph>>mSecsPerFrame (in category 'accessing')
> -----
> + mSecsPerFrame
> +
> +        ^ mSecsPerFrame!
>
> Item was changed:
>   ----- Method: FrameRateMorph>>step (in category 'stepping and
> presenter') -----
>   step
>          "Compute and display (every half second or so) the current
> framerate"
>
> +        | now timePassed |
> -        | now mSecs mSecsPerFrame framesPerSec newContents |
>          framesSinceLastDisplay := framesSinceLastDisplay + 1.
> +        now := DateAndTime now.
> +        timePassed := now - lastDisplayTime.
> +        (timePassed > self updateInterval) ifTrue:
> +                [| mSecs |
> +                mSecs := timePassed asMilliSeconds.
> +                mSecsPerFrame := mSecs // framesSinceLastDisplay.
> -        now := Time millisecondClockValue.
> -        mSecs := now - lastDisplayTime.
> -        (mSecs > 500 or: [mSecs < 0 "clock wrap-around"]) ifTrue:
> -                [mSecsPerFrame := mSecs // framesSinceLastDisplay.
>                  framesPerSec := (framesSinceLastDisplay * 1000) // mSecs.
> +                self contents: ('{1} mSecs ({2} frame{3}/sec)'
> +                        format: {mSecsPerFrame. framesPerSec.
> framesPerSec = 1 ifTrue: [''] ifFalse: ['s']}).
> -                newContents := mSecsPerFrame printString, ' mSecs (',
> framesPerSec printString, ' frame', (framesPerSec = 1 ifTrue: [''] ifFalse:
> ['s']), '/sec)'.
> -                self contents: newContents.
>                  lastDisplayTime := now.
>                  framesSinceLastDisplay := 0]
>          ifFalse:
>                  ["Ensure at least one pixel is drawn per frame"
>                  Preferences higherPerformance ifTrue: [self invalidRect:
> (self position extent: 1 at 1)]]!
>
> Item was added:
> + ----- Method: FrameRateMorph>>updateInterval (in category 'accessing')
> -----
> + updateInterval
> +
> +        ^ updateInterval!
>
> Item was added:
> + ----- Method: FrameRateMorph>>updateInterval: (in category 'accessing')
> -----
> + updateInterval: aNumber
> +
> +        updateInterval := aNumber!
>
> Item was changed:
> + (PackageInfo named: 'MorphicExtras') postscript: 'FrameRateMorph
> allSubInstances do: [:frm | | wasStepping |
> +        wasStepping := frm isStepping.
> +        wasStepping ifTrue: [frm stopStepping].
> +        frm
> +                instVarNamed: #lastDisplayTime
> +                        put: DateAndTime now;
> +                updateInterval: 500 milliSeconds.
> +        wasStepping ifTrue: [frm startStepping]].'!
> - (PackageInfo named: 'MorphicExtras') postscript: 'TrashCanMorph
> preserveTrash: Preferences preserveTrash.
> - TrashCanMorph slideDismissalsToTrash: Preferences slideDismissalsToTrash.
> -
> - Preferences removePreference: #preserveTrash.
> - Preferences removePreference: #slideDismissalsToTrash.'!
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190909/7cb15a4d/attachment.html>


More information about the Squeak-dev mailing list