The Inbox: EToys-tcj.324.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: EToys-tcj.324.mcz

commits-2
A new version of EToys was added to project The Inbox:
http://source.squeak.org/inbox/EToys-tcj.324.mcz

==================== Summary ====================

Name: EToys-tcj.324
Author: tcj
Time: 9 April 2018, 12:33:26.80885 pm
UUID: 4cdd717b-002f-4dc1-96e4-b32bb0452038
Ancestors: EToys-nice.323

Replace deprecated (and removed) 3.8-era message sends with contemporary equivalents.  Note:  now that this works again, it exposes two sends of #isThisEverCalled.

=============== Diff against EToys-nice.323 ===============

Item was changed:
  ----- Method: PDA>>openMonthView (in category 'initialization') -----
  openMonthView
  | row month col paneExtent window paneColor nRows |
  month := date notNil
  ifTrue: [date month]
  ifFalse: ["But... it's here somewhere..."
  ((self dependents detect: [:m | m isKindOf: PDAMorph])
  findA: MonthMorph) month].
  window := SystemWindow labelled: month printString.
  paneColor := Color transparent.
  window color: (Color r: 0.968 g: 1.0 b: 0.355).
+ nRows := 0.  month weeksDo: [:w | nRows := nRows + 1].
- nRows := 0.  month eachWeekDo: [:w | nRows := nRows + 1].
  paneExtent := ((1.0/7) @ (1.0/nRows)).
  row := 0.
+ month weeksDo:
- month eachWeekDo:
  [:week | col := 0.
+ week datesDo:
- week do:
  [:day | day month = month ifTrue:
  [window addMorph: ((PluggableListMorph on: self list: nil
  selected: nil changeSelected: nil menu: nil keystroke: nil)
  list: {(day dayOfMonth printString , '  ' , day weekday) asText allBold}
  , (self scheduleListForDay: day))
  frame: (paneExtent * (col@row) extent: paneExtent)].
  col := col + 1].
  row := row + 1].
 
  window firstSubmorph color: paneColor.
  window updatePaneColors.
  window openInWorld!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: EToys-tcj.324.mcz

Tim Johnson-2
Hi all,

How to test:

1. do it: PDAMorph new openInWorld

2. Yellow/menu button in the bottom pane (probably contains "no item is
selected")

3. select "spawn entire month"

4. Witness some usage of #isThisEverCalled in the following methods:

Halt: This is indeed called: 'PluggableListMorph>>list:'
Halt: This is indeed called: 'PluggableListMorph>>selectedMorph:'

(is #isThisEverCalled ever called anymore?  seems useful)

...and once you get past these, you may see a rather unadorned window
appear which looks like a calendar view for a month (but in my image,
contains no labels -- perhaps due to PluggableListMorph>>#list: not
doing part of its old job anymore, or something else, or nothing at
all).

Thanks,
Tim



On 2018-04-09 19:33, [hidden email] wrote:

> A new version of EToys was added to project The Inbox:
> http://source.squeak.org/inbox/EToys-tcj.324.mcz
>
> ==================== Summary ====================
>
> Name: EToys-tcj.324
> Author: tcj
> Time: 9 April 2018, 12:33:26.80885 pm
> UUID: 4cdd717b-002f-4dc1-96e4-b32bb0452038
> Ancestors: EToys-nice.323
>
> Replace deprecated (and removed) 3.8-era message sends with
> contemporary equivalents.  Note:  now that this works again, it
> exposes two sends of #isThisEverCalled.
>
> =============== Diff against EToys-nice.323 ===============
>
> Item was changed:
>   ----- Method: PDA>>openMonthView (in category 'initialization') -----
>   openMonthView
>   | row month col paneExtent window paneColor nRows |
>   month := date notNil
>   ifTrue: [date month]
>   ifFalse: ["But... it's here somewhere..."
>   ((self dependents detect: [:m | m isKindOf: PDAMorph])
>   findA: MonthMorph) month].
>   window := SystemWindow labelled: month printString.
>   paneColor := Color transparent.
>   window color: (Color r: 0.968 g: 1.0 b: 0.355).
> + nRows := 0.  month weeksDo: [:w | nRows := nRows + 1].
> - nRows := 0.  month eachWeekDo: [:w | nRows := nRows + 1].
>   paneExtent := ((1.0/7) @ (1.0/nRows)).
>   row := 0.
> + month weeksDo:
> - month eachWeekDo:
>   [:week | col := 0.
> + week datesDo:
> - week do:
>   [:day | day month = month ifTrue:
>   [window addMorph: ((PluggableListMorph on: self list: nil
>   selected: nil changeSelected: nil menu: nil keystroke: nil)
>   list: {(day dayOfMonth printString , '  ' , day weekday)
> asText allBold}
>   , (self scheduleListForDay: day))
>   frame: (paneExtent * (col@row) extent: paneExtent)].
>   col := col + 1].
>   row := row + 1].
>
>   window firstSubmorph color: paneColor.
>   window updatePaneColors.
>   window openInWorld!

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: EToys-tcj.324.mcz

Tim Johnson-2
Ah, the purpose of the spawned month window, which functions again after
my change and after getting past #isThisEverCalled:

"Spawn Entire Month
While this feature (accessible from bottom pane menu) is very crude and
does not offer interaction, its real purpose is for printing.  Expand
the spawned window to full screen, use the morph menu to choose ''print
PS to File...'', and then send the resulting .eps file to your printer.  
(At the time of this writing portrait and landscpe [sic] options were
reversed ;-).'"

Hooray :D

Best,
Tim

On 2018-04-09 12:42, Tim Johnson wrote:

> Hi all,
>
> How to test:
>
> 1. do it: PDAMorph new openInWorld
>
> 2. Yellow/menu button in the bottom pane (probably contains "no item
> is selected")
>
> 3. select "spawn entire month"
>
> 4. Witness some usage of #isThisEverCalled in the following methods:
>
> Halt: This is indeed called: 'PluggableListMorph>>list:'
> Halt: This is indeed called: 'PluggableListMorph>>selectedMorph:'
>
> (is #isThisEverCalled ever called anymore?  seems useful)
>
> ...and once you get past these, you may see a rather unadorned window
> appear which looks like a calendar view for a month (but in my image,
> contains no labels -- perhaps due to PluggableListMorph>>#list: not
> doing part of its old job anymore, or something else, or nothing at
> all).
>
> Thanks,
> Tim
>
>
>
> On 2018-04-09 19:33, [hidden email] wrote:
>> A new version of EToys was added to project The Inbox:
>> http://source.squeak.org/inbox/EToys-tcj.324.mcz
>>
>> ==================== Summary ====================
>>
>> Name: EToys-tcj.324
>> Author: tcj
>> Time: 9 April 2018, 12:33:26.80885 pm
>> UUID: 4cdd717b-002f-4dc1-96e4-b32bb0452038
>> Ancestors: EToys-nice.323
>>
>> Replace deprecated (and removed) 3.8-era message sends with
>> contemporary equivalents.  Note:  now that this works again, it
>> exposes two sends of #isThisEverCalled.
>>
>> =============== Diff against EToys-nice.323 ===============
>>
>> Item was changed:
>>   ----- Method: PDA>>openMonthView (in category 'initialization')
>> -----
>>   openMonthView
>>   | row month col paneExtent window paneColor nRows |
>>   month := date notNil
>>   ifTrue: [date month]
>>   ifFalse: ["But... it's here somewhere..."
>>   ((self dependents detect: [:m | m isKindOf: PDAMorph])
>>   findA: MonthMorph) month].
>>   window := SystemWindow labelled: month printString.
>>   paneColor := Color transparent.
>>   window color: (Color r: 0.968 g: 1.0 b: 0.355).
>> + nRows := 0.  month weeksDo: [:w | nRows := nRows + 1].
>> - nRows := 0.  month eachWeekDo: [:w | nRows := nRows + 1].
>>   paneExtent := ((1.0/7) @ (1.0/nRows)).
>>   row := 0.
>> + month weeksDo:
>> - month eachWeekDo:
>>   [:week | col := 0.
>> + week datesDo:
>> - week do:
>>   [:day | day month = month ifTrue:
>>   [window addMorph: ((PluggableListMorph on: self list: nil
>>   selected: nil changeSelected: nil menu: nil keystroke: nil)
>>   list: {(day dayOfMonth printString , '  ' , day weekday)
>> asText allBold}
>>   , (self scheduleListForDay: day))
>>   frame: (paneExtent * (col@row) extent: paneExtent)].
>>   col := col + 1].
>>   row := row + 1].
>>
>>   window firstSubmorph color: paneColor.
>>   window updatePaneColors.
>>   window openInWorld!