bugGNU Octave - Bugs: bug #66315, menu() throws an error when Qt...

 
 

bug #66315: menu() throws an error when Qt dialogs are not available

Submitter:  Francesco Potortì <pot>
Submitted:  Thu 10 Oct 2024 04:35:10 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 9.2.0 Release: 
Operating System:  * Any Fixed Release:  10.1.0
Planned Release:  10.1.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 17 Oct 2024 11:24:26 PM UTC, comment #3: 

I made a change on the development branch (https://hg.savannah.gnu.org/hgweb/octave/rev/320992fdbec8) which returns Octave to the behavior of the 6.X series.

If you want to force text menus in Octave you can
1) use octave-cli executable
2) unset the DISPLAY environment variable
3) override the function

__event_manager_have_dialogs__

with one that returns false.

Rik <rik5>
Group administrator
Thu 17 Oct 2024 03:21:12 PM UTC, comment #2: 

I re-titled the bug report to emphasize that there is a problem, and that this is a regression from the behavior from version 6 onwards.  Whenever Qt dialogs are not available, either because octave-cli has been used or the environment variable DISPLAY is unset, Octave now throws an error.  What it should do is gracefully fall back to using a text menu in the terminal window.

Rik <rik5>
Group administrator
Wed 16 Oct 2024 09:26:35 PM UTC, comment #1: 

I think this is a difference of interpretation.  The '--no-gui' option means that the GUI is not launched, but the Octave executable is still linked against Qt libraries so, for example, plotting will work.  The uiXXX.m series of functions also will show graphical user interfaces, even though called from a text command line.

Up to version 6.4.0 you could start the CLI version of Octave (octave-cli) which is not linked against Qt libraries.  Without that linking, the menu() function would generate a text-only menu on the console.  Something seems to have changed between 6.4 and the 7.X series and now Octave throws an error if the menu() command is used in the CLI.  This is wrong and should be fixed.

Your workaround to override the _event_manager_enabled_() function will work for the moment.

Rik <rik5>
Group administrator
Thu 10 Oct 2024 04:35:10 PM UTC, original submission:  

When I invoke Octave with --no-gui I expect menu() to present me with a text menu.  Rather, both with 8.3.0 on Windows and 9.2.0 on Debian, a graphic menu pops up, contrary to what I understand from the manual.

In my case, this cured the problem:

function guirunning = __event_manager_enabled__ ()
  guirunning = isguirunning
  return
endfunction


Francesco Potortì <pot>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-10-17 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Fixed Release9.3.0 10.1.0
        Planned Release9.3.0 10.1.0
    2024-10-17 rik5 Item GroupNone Regression
        StatusNone Confirmed
        Fixed ReleaseNone 9.3.0
        Planned ReleaseNone 9.3.0
        Summarymenu() pops up a graphic menu even in non-gui mode menu() throws an error when Qt dialogs are not available

    Back to the top

    Powered by Savane 3.15-64aa.
    Corresponding source code