Infinite dialog loop in authorinitials

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

Infinite dialog loop in authorinitials

K K Subbu
Hi,

I often press ctrl-v instead of alt-v by accident in Squeak and get an
dialog that doesn't go away. This is because of an infinite loop in:

Utilities>>authorInitials
[AuthorInitials isEmpty] whileTrue: [self setAuthorInitials].
        ^ AuthorInitials

called from TextEditor>>pasteInitials:. Should this be changed to:

   AuthorInitials ifEmpty: [ self setAuthorInitials ].
   ^AuthorInitials

Regards .. Subbu

Reply | Threaded
Open this post in threaded view
|

Re: Infinite dialog loop in authorinitials

marcel.taeumel
Hi Subbu,

do you propose a default value for AuthorInitials?

Best,
Marcel

Am 25.02.2020 10:40:33 schrieb K K Subbu <[hidden email]>:

Hi,

I often press ctrl-v instead of alt-v by accident in Squeak and get an
dialog that doesn't go away. This is because of an infinite loop in:

Utilities>>authorInitials
[AuthorInitials isEmpty] whileTrue: [self setAuthorInitials].
^ AuthorInitials

called from TextEditor>>pasteInitials:. Should this be changed to:

AuthorInitials ifEmpty: [ self setAuthorInitials ].
^AuthorInitials

Regards .. Subbu



Reply | Threaded
Open this post in threaded view
|

Re: Infinite dialog loop in authorinitials

K K Subbu
How about 'anon'?  See attached cs.

Regards .. Subbu

On 25/02/20 3:17 PM, Marcel Taeumel wrote:

> Hi Subbu,
>
> do you propose a default value for AuthorInitials?
>
> Best,
> Marcel
>>
>> Am 25.02.2020 10:40:33 schrieb K K Subbu <[hidden email]>:
>>
>> Hi,
>>
>> I often press ctrl-v instead of alt-v by accident in Squeak and get an
>> dialog that doesn't go away. This is because of an infinite loop in:
>>
>> Utilities>>authorInitials
>> [AuthorInitials isEmpty] whileTrue: [self setAuthorInitials].
>> ^ AuthorInitials
>>
>> called from TextEditor>>pasteInitials:. Should this be changed to:
>>
>> AuthorInitials ifEmpty: [ self setAuthorInitials ].
>> ^AuthorInitials
>>
>> Regards .. Subbu
>>
>
>



authinitials.1.cs (520 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Infinite dialog loop in authorinitials

marcel.taeumel
At the moment, users are forced to decide on author initials if not set. If they try to escape the dialog, it will just show up again until the user enters something.

I think we will leave this for 5.3. I am happy to change it to some default value after the release.

We could return a default value for those calls to #authorInitials but keep the prompt alive for new request. Hmm...

Thanks for pointing this out! I also find it confusing from time to time. Especially in a new image.

Best,
Marcel

Am 25.02.2020 15:05:30 schrieb K K Subbu <[hidden email]>:

How about 'anon'? See attached cs.

Regards .. Subbu

On 25/02/20 3:17 PM, Marcel Taeumel wrote:
> Hi Subbu,
>
> do you propose a default value for AuthorInitials?
>
> Best,
> Marcel
>>
>> Am 25.02.2020 10:40:33 schrieb K K Subbu :
>>
>> Hi,
>>
>> I often press ctrl-v instead of alt-v by accident in Squeak and get an
>> dialog that doesn't go away. This is because of an infinite loop in:
>>
>> Utilities>>authorInitials
>> [AuthorInitials isEmpty] whileTrue: [self setAuthorInitials].
>> ^ AuthorInitials
>>
>> called from TextEditor>>pasteInitials:. Should this be changed to:
>>
>> AuthorInitials ifEmpty: [ self setAuthorInitials ].
>> ^AuthorInitials
>>
>> Regards .. Subbu
>>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: Infinite dialog loop in authorinitials

K K Subbu
On 25/02/20 7:45 PM, Marcel Taeumel wrote:

> I think we will leave this for 5.3. I am happy to change it to some
> default value after the release.
>
> We could return a default value for those calls to #authorInitials but
> keep the prompt alive for new request. Hmm...
+1. I understand the need to get 5.3 out soon. I didn't realize all the
side effects of this change.

Regards .. Subbu

Reply | Threaded
Open this post in threaded view
|

Re: Infinite dialog loop in authorinitials

Christoph Thiede

If we choose a default value, I would vote for 'xyz'. It's more obvious than "anon" IMO ...

However, the use cases for not entering user initials should be very rare, shouldn't they? It would be a pity if people "clicked that pop up away" and committed to what repository/changeset ever all under the same default value. Why can't we leave the situation as is?


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von K K Subbu <[hidden email]>
Gesendet: Dienstag, 25. Februar 2020 16:11:49
An: John Pfersich via Squeak-dev
Betreff: Re: [squeak-dev] Infinite dialog loop in authorinitials
 
On 25/02/20 7:45 PM, Marcel Taeumel wrote:

> I think we will leave this for 5.3. I am happy to change it to some
> default value after the release.
>
> We could return a default value for those calls to #authorInitials but
> keep the prompt alive for new request. Hmm...
+1. I understand the need to get 5.3 out soon. I didn't realize all the
side effects of this change.

Regards .. Subbu



Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: Infinite dialog loop in authorinitials

timrowledge
It shouldn't result in a default; it should raise an exception. This dialogue is used in several places and if the user cancels then the operation that caused the dialogue should handle the exception to do sometihng more meaningful; cancel the SystemNavigation>>#browseMyChanges for example.

> On 2020-02-25, at 9:25 AM, Thiede, Christoph <[hidden email]> wrote:
>
> If we choose a default value, I would vote for 'xyz'. It's more obvious than "anon" IMO ...
> However, the use cases for not entering user initials should be very rare, shouldn't they? It would be a pity if people "clicked that pop up away" and committed to what repository/changeset ever all under the same default value. Why can't we leave the situation as is?
>
> Best,
> Christoph
> Von: Squeak-dev <[hidden email]> im Auftrag von K K Subbu <[hidden email]>
> Gesendet: Dienstag, 25. Februar 2020 16:11:49
> An: John Pfersich via Squeak-dev
> Betreff: Re: [squeak-dev] Infinite dialog loop in authorinitials
>  
> On 25/02/20 7:45 PM, Marcel Taeumel wrote:
>
> > I think we will leave this for 5.3. I am happy to change it to some
> > default value after the release.
> >
> > We could return a default value for those calls to #authorInitials but
> > keep the prompt alive for new request. Hmm...
> +1. I understand the need to get 5.3 out soon. I didn't realize all the
> side effects of this change.
>
> Regards .. Subbu


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
The best packed information most resembles random noise.



Reply | Threaded
Open this post in threaded view
|

Re: Infinite dialog loop in authorinitials

timrowledge
Oh, let's remember the slightly strange but useful UIManager>>#askForProvidedAnswerTo:ifSupplied: for this sort of case as well.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: DCBP: Detonate Chair on Bad Password



Reply | Threaded
Open this post in threaded view
|

Re: Infinite dialog loop in authorinitials

Christoph Thiede

Well, I agree that infinite dialog loops do not provide optimal user convenience. But it is not really a proper solution to serve any default value here, as Tim pointed out.


What about this?


Computer: Please enter your author initials!

User: No thanks (Cancel)!

Computer: Warning: This will raise an error. Are you sure?

User: I'm not sure (No)!

Computer: Please enter your author initials!

User: No thanks (Cancel)!

Computer: Warning: This will raise an error. Are you sure?

User: I'm sure (Yes)!
Computer: self error

Oh, let's remember the slightly strange but useful UIManager>>#askForProvidedAnswerTo:ifSupplied: for this sort of case as well.

Please, don't reuse this strangle protocol ... First, a ProvideAnswerNotification is already raised in this case, and second, their interface is quite horrible IMHO ... :-)

Best,
Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von tim Rowledge <[hidden email]>
Gesendet: Dienstag, 25. Februar 2020 19:47:23
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Infinite dialog loop in authorinitials
 
Oh, let's remember the slightly strange but useful UIManager>>#askForProvidedAnswerTo:ifSupplied: for this sort of case as well.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: DCBP: Detonate Chair on Bad Password





Carpe Squeak!