'From Squeak3.7beta of ''1 April 2004'' [latest update: #5948] on 8 June 2004 at 5:21:42 pm'! "Change Set: FileListOpenFixRepair-nk Date: 8 June 2004 Author: Ned Konz This fix for the update 5947FileListFileOpenFix-nk fixes the breakage to Project>>chooseNaturalLanguage. It also provides for an argumentGetter to be used with an extraSelector that takes more than one argument, though there are none at present. And it adds to the SimpleServiceEntry comment. "! !SimpleServiceEntry commentStamp: '' prior: 0! I represent a service provider : the service provider label : to be display in a menu selector : to do the service useLineAfter stateSelector : a secondary selector (to be able to query state of the provider for example) description : a description for balloon for example argumentGetter : a selector to get additional arguments with (if selector requres them) buttonLabel : a short label The entire client interface (provided by FileList and other users of the registry) is this (browse #getArgumentsFrom: and the senders of #argumentGetter:): fullName (returns a String with the full filename) dirAndFileName (returns {directory. fileName}) readOnlyStream (returns an open read-only stream) ! !FileList2 methodsFor: 'as yet unclassified' stamp: 'nk 6/8/2004 17:09'! serviceCancel "Answer a service for hitting the cancel button" ^ (SimpleServiceEntry new provider: self label: 'cancel' selector: #cancelHit description: 'hit here to cancel ') buttonLabel: 'cancel'! ! !FileList2 methodsFor: 'as yet unclassified' stamp: 'nk 6/8/2004 17:09'! serviceOkay "Answer a service for hitting the okay button" ^ (SimpleServiceEntry new provider: self label: 'okay' selector: #okHit description: 'hit here to accept the current selection') buttonLabel: 'ok'! ! !MenuMorph methodsFor: 'accessing' stamp: 'nk 6/8/2004 16:52'! lastItem ^ submorphs reverse detect: [ :m | m isKindOf: MenuItemMorph ] ifNone: [ submorphs last ]! ! !SimpleServiceEntry methodsFor: 'extra' stamp: 'nk 6/8/2004 16:42'! performExtraFor: anObject "carry out the extra service I provide" "the stateSelector can be used to ask state of the provider to be reflected in button or other" ^stateSelector numArgs = 0 ifTrue: [provider perform: stateSelector] ifFalse: [provider perform: stateSelector with: (self getArgumentsFrom: anObject) ] ! !