bugGNU Octave - Bugs: bug #45988, menu function returns 1 when no...

 
 

bug #45988: menu function returns 1 when no choice

Submitted by:  Francesco Potortì <pot>
Submitted on:  Thu 17 Sep 2015 12:13:34 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 22 Sep 2015 09:31:55 AM UTC, comment #6:

Fixed with http://hg.savannah.gnu.org/hgweb/octave/rev/bb09279e5c99 on the default (development) branch

@Francesco Potortì: You can download the fixed menu.m from http://hg.savannah.gnu.org/hgweb/octave/file/bb09279e5c99/scripts/miscellaneous/menu.m and replace it in your install directory so you don't have to wait for the 4.2 release.

Closing as fixed

Andreas Weber <andy1978>
Project Member
Tue 22 Sep 2015 04:06:17 AM UTC, comment #5:

This doesn't fix a regression or a segfault so it should be placed on the development branch. Looks good to me.

Rik <rik5>
Project Administrator
Tue 22 Sep 2015 01:32:21 AM UTC, comment #4:

@Rik: Sure, can I push this to stable?

(file #34946)

Andreas Weber <andy1978>
Project Member
Sat 19 Sep 2015 09:33:22 PM UTC, comment #3:

Confirmed. I re-filed the bug as a Matlab compatibility issue.

@Andreas: Can you prepare a changeset to update the documentation and also return 0 if the Cancel button is used.

Rik <rik5>
Project Administrator
Fri 18 Sep 2015 01:15:56 PM UTC, comment #2:

argh, sorry, it should IMHO be

Andreas Weber <andy1978>
Project Member
Fri 18 Sep 2015 01:14:04 PM UTC, comment #1:

I think menu should indeed return 0 if the user hits cancel (see Matlab documentation).

This seems like a bug in line 61
http://hg.savannah.gnu.org/hgweb/octave/file/ff904ae0285b/scripts/miscellaneous/menu.m#l61

which should IMHO be

Andreas Weber <andy1978>
Project Member
Thu 17 Sep 2015 12:13:34 PM UTC, original submission:

I would expect the menu function to return 0 when no choice is made by opressing hte Cancel button.

However, 1 is returned. This should be properly documented.

Francesco Potortì <pot>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #34946:  menu.patch added by andy1978 (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by andy1978 (Posted a comment)
  • -unavailable- added by pot (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 22 Sep 2015 09:31:55 AM UTCandy1978StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Tue 22 Sep 2015 01:32:21 AM UTCandy1978Attached File-=>Added menu.patch, #34946
    Sat 19 Sep 2015 09:33:22 PM UTCrik5Item GroupIncorrect Result=>Matlab Compatibility
      StatusNone=>Confirmed
    Fri 18 Sep 2015 01:15:56 PM UTCandy1978CategoryDocumentation=>Octave Function
      Item GroupDocumentation=>Incorrect Result
      Summarymenu function eturns 1 when no choice=>menu function returns 1 when no choice

    Back to the top


    Powered by Savane 3.1-cleanup1