[Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel

bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4-

C THAL reported a new bug.

Summary
-------

Message.Question should return -1 on cancel

Type             : Bug
Priority         : Medium
Gambas version   : 3.9.90 (TRUNK)
Product          : Language


Description
-----------

Message.Question returns 2 if the message window was closed or canceled via <Esc>.

That is bad, especially if there are two buttons and the action should not be default, but on button two, like so:

Dim ret as integer

ret = Message.Question("Do you really want to delete all?", "No", "Yes")

--------------------------------------------------------------------------

If the user cancels or closes the window of the message it returns 2! All will be deleted ...





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel

Tony Morehen
That is the documented behaviour:

All Message functions can have up to three buttons:

  *

    The first button is always the default button.

  *

    The last button is always the cancel button.


On 2017-07-19 09:20 AM, [hidden email] wrote:

> http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4-
>
> C THAL reported a new bug.
>
> Summary
> -------
>
> Message.Question should return -1 on cancel
>
> Type             : Bug
> Priority         : Medium
> Gambas version   : 3.9.90 (TRUNK)
> Product          : Language
>
>
> Description
> -----------
>
> Message.Question returns 2 if the message window was closed or canceled via <Esc>.
>
> That is bad, especially if there are two buttons and the action should not be default, but on button two, like so:
>
> Dim ret as integer
>
> ret = Message.Question("Do you really want to delete all?", "No", "Yes")
>
> --------------------------------------------------------------------------
>
> If the user cancels or closes the window of the message it returns 2! All will be deleted ...
>
>
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel

bugtracker
In reply to this post by bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4-

Comment #1 by PICCORO LENZ MCKAY:

That is the documented behaviour:

>All Message functions can have up to three buttons:
> * The first button is always the default button.
> * The last button is always the cancel button.

http://gambaswiki.org/wiki/comp/gb.qt4/message

and for tony, it must be answered in the bugtracker.. the nex time, i'll make now but take in consideration that the next time:

PICCORO LENZ MCKAY changed the state of the bug to: Invalid.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel

Gianluigi
In reply to this post by Tony Morehen
Thal, you could take a look at this discussion [0]

Regards
Gianluigi

[0] http://gambas.8142.n7.nabble.com/MessageBox-problem-td56154.html#a56231

2017-07-19 15:33 GMT+02:00 Tony Morehen <[hidden email]>:

> That is the documented behaviour:
>
> All Message functions can have up to three buttons:
>
>  *
>
>    The first button is always the default button.
>
>  *
>
>    The last button is always the cancel button.
>
>
> On 2017-07-19 09:20 AM, [hidden email] wrote:
>
>> http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4-
>>
>> C THAL reported a new bug.
>>
>> Summary
>> -------
>>
>> Message.Question should return -1 on cancel
>>
>> Type             : Bug
>> Priority         : Medium
>> Gambas version   : 3.9.90 (TRUNK)
>> Product          : Language
>>
>>
>> Description
>> -----------
>>
>> Message.Question returns 2 if the message window was closed or canceled
>> via <Esc>.
>>
>> That is bad, especially if there are two buttons and the action should
>> not be default, but on button two, like so:
>>
>> Dim ret as integer
>>
>> ret = Message.Question("Do you really want to delete all?", "No", "Yes")
>>
>> ------------------------------------------------------------
>> --------------
>>
>> If the user cancels or closes the window of the message it returns 2! All
>> will be deleted ...
>>
>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Gambas-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel

bugtracker
In reply to this post by bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4-

Comment #2 by C THAL:

Ok, thank you all. I did not see it because I just saw http://gambaswiki.org/wiki/comp/gb.form/message (linked from inside the IDE).



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Gambas Bug Tracker] Bug #1128: Message.Question should return -1 on cancel

bugtracker
In reply to this post by bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1128&from=L21haW4-

Comment #3 by PICCORO LENZ MCKAY:

inside the ide you can click as if you are into a browser... and see documentation in message.question or whatever..

also remenber that some wiki's are not updated, by example i try to mantain the spanish wiki up to date.. but i can cover all the changes..



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Loading...