bugGNU Octave - Bugs: bug #47700, Octave JDialogBox interface uses...

 
 

bug #47700: Octave JDialogBox interface uses deprecated features

Submitter:  Rik <rik5>
Submitted:  Thu 14 Apr 2016 10:48:52 PM UTC
   
 
Category:  Configuration and Build System Severity:  2 - Minor
Priority:  5 - Normal Item Group:  Other
Status:  Fixed Assigned to:  siko1056
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 19 Apr 2016 01:31:37 PM UTC, comment #5: 
Kai Torben Ohlhus <siko1056>
Group Member
Fri 15 Apr 2016 09:13:43 PM UTC, comment #4: 

@Rik: I think I got you right. The post on the mailing list is coming soon.

Kai Torben Ohlhus <siko1056>
Group Member
Fri 15 Apr 2016 05:58:25 PM UTC, comment #3: 

@Kai: I don't think I phrased things very well.  I think we should get rid of the Java dialog code.  I wrote "My biggest objection" and it would have been clearer to write "My biggest objection to supporting Java dialog boxes ...".

Rik <rik5>
Group administrator
Fri 15 Apr 2016 03:35:02 PM UTC, comment #2: 

@Kai: I'm fine with removing the Java dialog boxes.  However, could you circulate this idea on the Octave-Maintainer's list just to make sure no one else objects?  My biggest objection is that it is a lot of code to maintain for a very small corner case when Qt is not enabled.

Rik <rik5>
Group administrator
Fri 15 Apr 2016 11:50:29 AM UTC, comment #1: 

Maybe we should abandon all Java-dialogs, instead of trying to fix and maintain unused code. There are two concurrent implementations of dialogs (Java and QT). The documentation still mentions only Java:

https://www.gnu.org/software/octave/doc/v4.0.1/Dialog-Box-Functions.html#Dialog-Box-Functions

The concurrency is visible in

scripts/gui/private/message_dialog.m,

where first always the QT variant is tried, thereafter the Java variant. Thus I think no one has ever really seen the Java variant before, as QT works naturally with the GUI.

The java variant is implemented in

scripts/java/org/octave/*.java

the QT variant in

libinterp/corefcn/octave-link.{h/cc}

The only pro for the Java-variant is, that it is able to print some TeX symbols

https://www.gnu.org/software/octave/doc/v4.0.1/Which-TeX-symbols-are-implemented-in-dialog-functions_003f.html

This doesn't apply for the QT-variant, but for me this feature has never been accessible before and it is a minor victim for clarifying the code a lot.

As I don't get negative respone, I will remove the Java-variant with changes to the calling code and documentation.

Kai Torben Ohlhus <siko1056>
Group Member
Thu 14 Apr 2016 10:48:52 PM UTC, original submission:  

I found the following new warning when compiling the default branch of Octave.


  GEN      scripts/java/org/octave/JDialogBox.class
Note: org/octave/JDialogBox.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.



java -version
java version "1.7.0_95"
OpenJDK Runtime Environment (IcedTea 2.6.4) (7u95-2.6.4-0ubuntu0.15.10.2)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)


Someone who knows Java might take a look at the file scripts/java/org/octave/JDialogBox.java and see if they can spot the problem.  Or compile the .java file with -Xlint:deprecation as suggested and see if it pinpoints the issue.

I've marked the bug as minor because most dialog boxes now use Qt widgets.  It's only when running with Qt libraries that Octave falls back to Java dialog boxes.

Rik <rik5>
Group administrator

 

(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 siko1056 (Posted a comment)
  • -email is unavailable- added by rik5 (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-19 siko1056 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2016-04-15 siko1056 StatusNone Need Info
        Assigned toNone siko1056
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code