Skip to content

Commit

Permalink
Merge pull request #14 from chisandrei/master
Browse files Browse the repository at this point in the history
Update the embedded search from views to spawn a timezone object
  • Loading branch information
svenvc committed Sep 25, 2023
2 parents 97f6caa + f90c070 commit 705bf5c
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions repository/ZTimestamp-GT/ZTimezone.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,21 @@ ZTimezone class >> gtViewCachedTimezonesFor: aView [
tooltip: 'Search cached timezones by id';
id: GtPharoSearchCodeButtonId;
objectActOn: [ :anActOnEvent :anItem :theButton |
(anItem isKindOf: ZTimezone) ifTrue: [
| columnedList |
| targetTimezone |
targetTimezone := anActOnEvent objectToSend.
(targetTimezone isKindOf: ZTimezone)
ifTrue: [
| columnedList |

columnedList := theButton phlow viewContent
allChildrenBreadthFirstDetect: [ :child |
child isKindOf: BrColumnedList ]
ifFound: [ :child | child ].
columnedList scrollToItem: anItem.
columnedList selectOne: (columnedList items indexOf: anItem).

anActOnEvent beActed ] ];
columnedList := theButton phlow viewContent
allChildrenBreadthFirstDetect: [ :child |
child isKindOf: BrColumnedList ]
ifFound: [ :child | child ].
columnedList scrollToItem: targetTimezone.
columnedList selectOne: (columnedList items
indexOf: targetTimezone).

anActOnEvent beActed ] ];
asElement ]
tooltip: 'Search cached timezones by id'
]
Expand Down Expand Up @@ -98,17 +102,20 @@ ZTimezone class >> gtViewTimezoneIdentifiersFor: aView [
tooltip: 'Search timezone identifiers';
id: GtPharoSearchCodeButtonId;
objectActOn: [ :anActOnEvent :anItem :theButton |
(anItem isKindOf: Symbol) ifTrue: [
| columnedList |

columnedList := theButton phlow viewContent
allChildrenBreadthFirstDetect: [ :child |
child isKindOf: BrColumnedList ]
ifFound: [ :child | child ].
columnedList scrollToItem: anItem.
columnedList selectOne: (columnedList items indexOf: anItem).
| targetTimezone |
targetTimezone := anActOnEvent objectToSend.
(targetTimezone isKindOf: ZTimezone)
ifTrue: [
| columnedList |

anActOnEvent beActed ] ];
columnedList := theButton phlow viewContent
allChildrenBreadthFirstDetect: [ :child |
child isKindOf: BrColumnedList ]
ifFound: [ :child | child ].
columnedList scrollToItem: targetTimezone id.
columnedList selectOne: (columnedList items
indexOf: targetTimezone id) ].
anActOnEvent beActed ];
asElement ]
tooltip: 'Search timezone identifiers'
]
Expand Down

0 comments on commit 705bf5c

Please sign in to comment.