The Trunk: CommandLine-pre.11.mcz

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

The Trunk: CommandLine-pre.11.mcz

commits-2
Patrick Rein uploaded a new version of CommandLine to project The Trunk:
http://source.squeak.org/trunk/CommandLine-pre.11.mcz

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

Name: CommandLine-pre.11
Author: pre
Time: 1 November 2018, 2:57:18.793173 pm
UUID: 578497bd-0e64-a84f-8df7-d2e096d406ec
Ancestors: CommandLine-tpr.10

Updates the DummyUIManager to answer the ProvideAnswerNotification

=============== Diff against CommandLine-tpr.10 ===============

Item was changed:
  ----- Method: DummyUIManager>>chooseDirectory:from: (in category 'ui requests') -----
  chooseDirectory: label from: dir
+ self askForProvidedAnswerTo: label ifSupplied: [:answer |
+ ^ answer].
+
  ^ nil!

Item was changed:
  ----- Method: DummyUIManager>>chooseFrom:lines:title: (in category 'ui requests') -----
  chooseFrom: aList lines: linesArray title: aString
+ self askForProvidedAnswerTo: aString ifSupplied: [:answer |
+ (answer = #cancel or: [answer isNil]) ifTrue: [^ 0].
+ ^ aList indexOf: answer].
+
+ ^ 1!
- ^ aList first!

Item was changed:
  ----- Method: DummyUIManager>>chooseFrom:values:lines:title: (in category 'ui requests') -----
  chooseFrom: labelList values: valueList lines: linesArray title: aString
+ self askForProvidedAnswerTo: aString ifSupplied: [:answer |
+ (answer = #cancel or: [answer isNil]) ifTrue: [^ nil].
+ ^ valueList at: (valueList indexOf: answer)].
+
  ^ valueList first!

Item was changed:
  ----- Method: DummyUIManager>>confirm: (in category 'ui requests') -----
  confirm: queryString
+ self askForProvidedAnswerTo: queryString ifSupplied: [:answer |
+ ^ answer].
- (ProvideAnswerNotification signal: queryString)
- ifNotNil: [:answer|^answer].
 
  self error: 'No user response possible'!

Item was changed:
  ----- Method: DummyUIManager>>confirm:orCancel: (in category 'ui requests') -----
  confirm: aString orCancel: cancelBlock
+ self askForProvidedAnswerTo: aString ifSupplied: [:answer |
+ ^ (answer = #cancel or: [answer isNil])
+ ifTrue: [cancelBlock value]
+ ifFalse: [answer]].
- (ProvideAnswerNotification signal: aString) ifNotNil: [:answer |
- ^answer == #cancel ifTrue: [cancelBlock value] ifFalse: [answer]].
 
  self error: 'No user response possible'!

Item was removed:
- ----- Method: DummyUIManager>>fontFromUser: (in category 'ui requests') -----
- fontFromUser: priorFont
- self error: 'No user response possible'!

Item was changed:
  ----- Method: DummyUIManager>>inform: (in category 'ui requests') -----
  inform: aString
+ "Nothing to be done here"
+ self askForProvidedAnswerTo: aString ifSupplied: [:answer |
+ ^ answer].!
- "Nothing to be done here"!

Item was changed:
+ ----- Method: DummyUIManager>>openDebugger:on:context:label:contents:fullView: (in category 'ui project indirecting') -----
- ----- Method: DummyUIManager>>openDebugger:on:context:label:contents:fullView: (in category 'ui requests') -----
  openDebugger: aDebugger on: process context: context label: title contents: contentsStringOrNil fullView: bool
  "open a debugger - the two versions for mvc & morphic are very close and can surely be merged so that this can be removed"
  ^nil!

Item was changed:
+ ----- Method: DummyUIManager>>openFancyMailComposition: (in category 'ui project indirecting') -----
- ----- Method: DummyUIManager>>openFancyMailComposition: (in category 'ui requests') -----
  openFancyMailComposition: fancyMail
  "FancyMailComposition should probably be removed in favour of MailComposition, but at least ought to be made a ToolBuilder thing"
  ^nil!

Item was changed:
+ ----- Method: DummyUIManager>>openPluggableFileList:label:in: (in category 'ui project indirecting') -----
- ----- Method: DummyUIManager>>openPluggableFileList:label:in: (in category 'ui requests') -----
  openPluggableFileList: aPluggableFileList label: aString in: aWorld
  "PluggableFileList is being deprecated and this can go away soon"
  ^nil!

Item was removed:
- ----- Method: DummyUIManager>>openPluggableFileListLabel:in: (in category 'ui requests') -----
- openPluggableFileListLabel: aString in: aWorld
- "PluggableFileList is being deprecated and this can go away soon"
- ^nil!

Item was changed:
  ----- Method: DummyUIManager>>request:initialAnswer: (in category 'ui requests') -----
  request: queryString initialAnswer: defaultAnswer
+ self askForProvidedAnswerTo: queryString ifSupplied: [:answer |
+ ^ answer = #default
+ ifTrue: [defaultAnswer]
+ ifFalse: [answer]].
- (ProvideAnswerNotification signal: queryString)
- ifNotNil: [:answer |
-    ^ answer == #default ifTrue: [defaultAnswer] ifFalse: [answer]].
 
  self error: 'No user response possible'!

Item was changed:
  ----- Method: DummyUIManager>>requestPassword: (in category 'ui requests') -----
  requestPassword: queryString
+
  ^ self request: queryString initialAnswer: ''!

Item was changed:
+ ----- Method: DummyUIManager>>resumeDebugger:process: (in category 'ui project indirecting') -----
- ----- Method: DummyUIManager>>resumeDebugger:process: (in category 'ui requests') -----
  resumeDebugger: aDebugger process: aTopView
  "resume a debugger - the two versions for mvc & morphic are very close and can surely be merged so that this can be removed"
  ^nil!

Item was changed:
  ----- Method: DummyUIManager>>saveFilenameRequest:initialAnswer: (in category 'ui requests') -----
  saveFilenameRequest: queryString initialAnswer: defaultAnswer
  "Open a FileSaverDialog to ask for a place and filename to use for saving a file. The initial suggestion for the filename is defaultAnswer but the user may choose any existing file or type in a new name entirely"
 
+ self askForProvidedAnswerTo: queryString ifSupplied: [:answer |
+ ^ answer = #default
+ ifTrue: [defaultAnswer]
+ ifFalse: [answer]].
- (ProvideAnswerNotification signal: queryString)
- ifNotNil: [:answer |
-    ^ answer == #default ifTrue: [defaultAnswer] ifFalse: [answer]].
 
  self error: 'No user response possible'!

Item was changed:
+ ----- Method: DummyUIManager>>startUpMenu:withCaption:icon:at:allowKeyboard: (in category 'ui project indirecting') -----
- ----- Method: DummyUIManager>>startUpMenu:withCaption:icon:at:allowKeyboard: (in category 'ui requests') -----
  startUpMenu: aMenu withCaption: captionOrNil icon: aForm at: location allowKeyboard: aBoolean
  "A menu needs to startup and depends on the current type of ui manager for what sort of startup to do. Very ugly, and really needs replacing with a much better menu system"
 
  ^nil
  !