The Trunk: Monticello-bf.535.mcz

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

The Trunk: Monticello-bf.535.mcz

commits-2
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@400).
  [self window world notNil] whileTrue: [
  self window outermostWorldMorph doOneCycle.
  ].
  morph := nil.
  ^ modalValue!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.535.mcz

Chris Muller-3
Arrrgghh!!!   I just don't understand why you seem to LOVE modal
warnings and messages don't you?  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.

On Thu, Apr 11, 2013 at 7:42 PM,  <[hidden email]> 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@400).
>         [self window world notNil] whileTrue: [
>                 self window outermostWorldMorph doOneCycle.
>         ].
>         morph := nil.
>         ^ modalValue!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.535.mcz

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

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?

On Sun, Apr 14, 2013 at 11:09 AM, Chris Muller <[hidden email]> wrote:

> Arrrgghh!!!   I just don't understand why you seem to LOVE modal
> warnings and messages don't you?  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.
>
> On Thu, Apr 11, 2013 at 7:42 PM,  <[hidden email]> 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@400).
>>         [self window world notNil] whileTrue: [
>>                 self window outermostWorldMorph doOneCycle.
>>         ].
>>         morph := nil.
>>         ^ modalValue!
>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.535.mcz

Bert Freudenberg
Am 14.04.2013 um 10:31 schrieb Chris Muller <[hidden email]>:

> 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 <[hidden email]> 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,  <[hidden email]> 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@400).
>>>        [self window world notNil] whileTrue: [
>>>                self window outermostWorldMorph doOneCycle.
>>>        ].
>>>        morph := nil.
>>>        ^ modalValue!
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.535.mcz

Levente Uzonyi-2
In reply to this post by Chris Muller-3
On Sun, 14 Apr 2013, Chris Muller wrote:

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

That happens when you modify the package after opening the dialog.


Levente

>
> 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?
>
> On Sun, Apr 14, 2013 at 11:09 AM, Chris Muller <[hidden email]> wrote:
>> Arrrgghh!!!   I just don't understand why you seem to LOVE modal
>> warnings and messages don't you?  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.
>>
>> On Thu, Apr 11, 2013 at 7:42 PM,  <[hidden email]> 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@400).
>>>         [self window world notNil] whileTrue: [
>>>                 self window outermostWorldMorph doOneCycle.
>>>         ].
>>>         morph := nil.
>>>         ^ modalValue!
>>>
>>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.535.mcz

Bert Freudenberg

On 14.04.2013, at 23:37, Levente Uzonyi <[hidden email]> wrote:

> On Sun, 14 Apr 2013, Chris Muller wrote:
>
>> Let me try again.  This is the bug where sometimes clicking "Ok" on
>> the MCSaveVersionDialog -- nothing happens and the package doesn't get
>> saved..?
>
> That happens when you modify the package after opening the dialog.
>
>
> Levente

No. It happens when a debugger popped up and you close it instead of proceeding.

MC is looping in #showModally waiting for the dialog to be closed. The debugger creates a new UI process, the old one running our loop is suspended.

- Bert -

>
>>
>> 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?
>>
>> On Sun, Apr 14, 2013 at 11:09 AM, Chris Muller <[hidden email]> wrote:
>>> Arrrgghh!!!   I just don't understand why you seem to LOVE modal
>>> warnings and messages don't you?  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.
>>>
>>> On Thu, Apr 11, 2013 at 7:42 PM,  <[hidden email]> 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@400).
>>>>        [self window world notNil] whileTrue: [
>>>>                self window outermostWorldMorph doOneCycle.
>>>>        ].
>>>>        morph := nil.
>>>>        ^ modalValue!
>>>>
>>>>
>>
>>
>




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-bf.535.mcz

Chris Muller-3
In reply to this post by Bert Freudenberg
>>> Arrrgghh!!!   I just don't understand why you seem to LOVE modal
>>> warnings and messages don't you?
>
> I don't...

Ok, I'm glad to hear that.

> ... But if there are modal dialogs they should work.

> Feel free to improve.

Indeed, I intend to.  As you may have guessed, I have a strong
aversion to the computer telling me to "Click this button."  :)

> 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.

Fair enough -- I had gotten so used to pressing Command+A, Command+C
before clicking OK that it has become almost a "single gesture" and
allow me to forget this bug.  Now your pop-up will be an annoying
reminder.   :)   -- which is good because it needs to be fixed.