[Cuis-dev] [IMPROV] asMenuItemPrefix
Gerald Klix
cuis.01 at klix.ch
Wed Sep 1 08:45:47 PDT 2021
Hi all, Hi Juan,
As <Yes>/<No> prefixes in menu items become more
and more common in these days, I added two (and a half)
utility methods to the Boolean hierarchy to
avoid code repetitions.
Have fun with the attached change set.
HTH and Best Regards,
Gerald
-------------- next part --------------
'From Haver 5.0 [latest update: #4821] on 1 September 2021 at 5:39:26 pm'!
!Boolean methodsFor: 'user interface support' stamp: 'KLG 9/1/2021 17:33:22'!
asMenuItemTextPrefix
"Answer '<Yes>' or '<No>' to prefix a menu item text with a check box. "
^ self subclassResponsibility! !
!False methodsFor: 'user interface support' stamp: 'KLG 9/1/2021 17:33:51'!
asMenuItemTextPrefix
"Answer '<Yes>' or '<No>' to prefix a menu item text with a check box. "
^ '<No>'! !
!True methodsFor: 'user interface support' stamp: 'KLG 9/1/2021 17:34:02'!
asMenuItemTextPrefix
"Answer '<Yes>' or '<No>' to prefix a menu item text with a check box. "
^ '<Yes>'! !
!Boolean reorganize!
('logical operations' & | eqv: not xor:)
('controlling' and: and:and: and:and:and: and:and:and:and: ifFalse: ifFalse:ifTrue: ifTrue: ifTrue:ifFalse: or: or:or: or:or:or: or:or:or:or:)
('copying' shallowCopy)
('testing' is:)
('printing' isLiteral storeOn:)
('user interface support' asMenuItemTextPrefix)
!
!False reorganize!
('logical operations' & not xor: |)
('controlling' and: and:and: and:and:and: and:and:and:and: ifFalse: ifFalse:ifTrue: ifTrue: ifTrue:ifFalse: or: or:or: or:or:or: or:or:or:or: orNot:)
('printing' printOn:)
('user interface support' asMenuItemTextPrefix)
!
!True reorganize!
('logical operations' & not xor: |)
('controlling' and: and:and: and:and:and: and:and:and:and: ifFalse: ifFalse:ifTrue: ifTrue: ifTrue:ifFalse: or: or:or: or:or:or: or:or:or:or: orNot:)
('printing' printOn:)
('user interface support' asMenuItemTextPrefix)
!
More information about the Cuis-dev
mailing list