[squeak-dev] The Trunk: Monticello-bf.535.mcz

Bert Freudenberg bert at freudenbergs.de
Mon Apr 15 02:56:04 UTC 2013


Am 14.04.2013 um 10:31 schrieb Chris Muller <asqueaker at gmail.com>:

> Let me try again.  This is the bug where sometimes clicking "Ok" on
> the MCSaveVersionDialog -- nothing happens and the package doesn't get
> saved..?

Precisely. Better to warn the user than ignore the user.  

> I haven't researched this, is there some reason this dialog must have
> a separate process instead of just a simple callback when OK or Cancel
> is pressed?

This is the way it is currently implemented. 

> On Sun, Apr 14, 2013 at 11:09 AM, Chris Muller <asqueaker at gmail.com> wrote:
>> Arrrgghh!!!   I just don't understand why you seem to LOVE modal
>> warnings and messages don't you?  

I don't. But if there are modal dialogs they should work. 

>> The problem here is the modality of
>> the dialog in the first place, the solution should be to get rid of
>> that not to layer on more modality.
>> 
>> The user should be directing the computer, not vice-versa.

Feel free to improve. 

What I did here is give the user the option to at least e.g. copy the commit message before closing the dialog without doing anything, because the process waiting on the dialog was stopped. 

- Bert -



>> On Thu, Apr 11, 2013 at 7:42 PM,  <commits at source.squeak.org> wrote:
>>> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
>>> http://source.squeak.org/trunk/Monticello-bf.535.mcz
>>> 
>>> ==================== Summary ====================
>>> 
>>> Name: Monticello-bf.535
>>> Author: bf
>>> Time: 11 April 2013, 5:42:14.486 pm
>>> UUID: 29816693-6d94-4dd7-ab81-c8ede42620ef
>>> Ancestors: Monticello-bf.534
>>> 
>>> Warn user about an interrupted modal dialog.
>>> 
>>> =============== Diff against Monticello-bf.534 ===============
>>> 
>>> Item was changed:
>>>  Model subclass: #MCTool
>>> +       instanceVariableNames: 'morph label modalProcess modalValue'
>>> -       instanceVariableNames: 'morph label modal modalValue'
>>>        classVariableNames: ''
>>>        poolDictionaries: ''
>>>        category: 'Monticello-UI'!
>>> 
>>> Item was changed:
>>>  ----- Method: MCTool>>answer: (in category 'morphic ui') -----
>>>  answer: anObject
>>> +       (modalProcess notNil and: [modalProcess ~~ Processor activeProcess])
>>> +               ifTrue: [^self inform: 'This modal dialog was interrupted, please close it'].
>>>        modalValue := anObject.
>>>        self close.!
>>> 
>>> Item was changed:
>>>  ----- Method: MCTool>>show (in category 'morphic ui') -----
>>>  show
>>> +       modalProcess := nil.
>>> -       modal := false.
>>>        Smalltalk at: #ToolBuilder ifPresent: [:tb | tb open: self. ^ self].
>>>        ^self window openInWorldExtent: self defaultExtent; yourself!
>>> 
>>> Item was changed:
>>>  ----- Method: MCTool>>showLabelled: (in category 'morphic ui') -----
>>>  showLabelled: labelString
>>> +       modalProcess := nil.
>>> -       modal := false.
>>>        self label: labelString.
>>>        ^(self window)
>>>                openInWorldExtent: self defaultExtent;
>>>                yourself!
>>> 
>>> Item was changed:
>>>  ----- Method: MCTool>>showModally (in category 'morphic ui') -----
>>>  showModally
>>> +       modalProcess := Processor activeProcess.
>>> -       modal := true.
>>>        self window openInWorldExtent: (400 at 400).
>>>        [self window world notNil] whileTrue: [
>>>                self window outermostWorldMorph doOneCycle.
>>>        ].
>>>        morph := nil.
>>>        ^ modalValue!
> 


More information about the Squeak-dev mailing list