Fix to RMIR for direct GUI access to rmaster.err

Discussion forum for JP1 software tools currently in use, or being developed, such as IR, KM, RemoteMaster, and other misc apps/tools.

Moderator: Moderators

Post Reply
Barf
Expert
Posts: 1522
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Fix to RMIR for direct GUI access to rmaster.err

Post by Barf »

The enclosed fix adds an entry "Advanced -> Display the errors file rmaster.err" to the menu bar of RMIR. When invoked, it opens a popup window showing the current content of the errors file, per default rmaster.err, but can also be renamed using the -errors command line option.

On request, I will be happy to check it in.

Code: Select all

Index: src/main/java/com/hifiremote/jp1/RMIRSetup.java
===================================================================
--- src/main/java/com/hifiremote/jp1/RMIRSetup.java     (revision 2187)
+++ src/main/java/com/hifiremote/jp1/RMIRSetup.java     (working copy)
@@ -170,6 +170,7 @@
   private static JMenuItem extractSSItem = null;
   private static JMenuItem analyzeMAXQprotocols = null;
   private static JMenuItem importIctAsLearned = null;
+  private static JMenuItem openRmasterErr = null;
   private static String scaling = null;
 
   public enum WavOp { NEW, MERGE, SAVE, PLAY };
@@ -3529,6 +3530,16 @@
     importIctAsLearned.addActionListener( this );
     menu.add( importIctAsLearned );
     
+    if ( desktopUsable() )
+    {
+      menu.addSeparator();
+      openRmasterErr = new JMenuItem( "Display the errors file rmaster.err", KeyEvent.VK_E );
+      openRmasterErr.setToolTipText( JTableX.getHtmlToolTip(
+       "Opens a popup window showing the current content of the error file, in general <code>rmaster.err</code>.<br><b>Note:</b> will not update!" ) );
+      openRmasterErr.addActionListener( this );
+      menu.add( openRmasterErr );
+    }
+    
     menu = new JMenu( "Help" );
     menu.setMnemonic( KeyEvent.VK_H );
     menuBar.add( menu );
@@ -6661,6 +6672,10 @@
       {
         DeviceUpgradeConverter.importIctAsLearned( this );
       }
+      else if ( source == openRmasterErr )
+      {
+       JP1Frame.browse(RemoteMaster.getErrorsFile().toURI());
+      }
       else if ( source == aboutItem )
       {
         StringBuilder sb = new StringBuilder( 1000 );
Index: src/main/java/com/hifiremote/jp1/RemoteMaster.java
===================================================================
--- src/main/java/com/hifiremote/jp1/RemoteMaster.java  (revision 2187)
+++ src/main/java/com/hifiremote/jp1/RemoteMaster.java  (working copy)
@@ -33,6 +33,7 @@
 { 
   private static File workDir = null;
   private static PropertyFile properties = null;
+  private static File errorsFile = null;
   private static JCommander argumentParser;
   private static File addonDir = null;
   private static String irpTransmogrifierCommitId = null;
@@ -185,6 +186,11 @@
   {
     return "v" + version + buildSeparator + buildVer;
   }
+  
+  public static File getErrorsFile()
+  {
+    return errorsFile;
+  }
 
   public final static String version = "3.2";
   /*
@@ -340,7 +346,7 @@
     rmduSys = new File( workDir, "RMDU.sys" );
     rmpbSys = new File( workDir, "RMPB.sys" );
 
-    File errorsFile = commandLineArgs.errorsFile;
+    errorsFile = commandLineArgs.errorsFile;
     if ( errorsFile == null )
       errorsFile = getWritableFile( workDir, "rmaster.err" );
 
Barf
Expert
Posts: 1522
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

RemoteMaster.jar with the fix is available for testing here, also including the fix for madbrain's problem. Too big for the diagnostic area! :evil:
mathdon
Expert
Posts: 4725
Joined: Tue Jul 22, 2008 8:53 am
Location: Cambridge, UK

Post by mathdon »

Bengt, I am sorry for apparently ignoring your fix, but I have recently been posting further revisions of RMIR almost on a daily basis. Currently it is at revision 2191. I think that will be stable, at least for a few days, and I would be grateful if you would check your fix into that revision. Unless further testing reveals any issues, when you have checked it in I will update the build to v3.2.4 and post it as a new development version with the expectation that it can be changed to an official release in due course.

No-one has shown much interest in my recent addition of creating extract files (.gext) and CSV extracts (.ext) available in RMIR admin mode, but it has taken a great deal of work. I believe that is now complete, hence the expected stability of r2191. I get the feeling that you and I are the only developers remaining, Rob seems to have given up and 3FG is becoming invisible, presumably no longer having the time for RMIR.
Graham
Barf
Expert
Posts: 1522
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

Checked in as requested. So it is now r2192.

No, I do not have a problem with "delays". After all, it has been less than a week :wink: .
I get the feeling that you and I are the only developers remaining, Rob seems to have given up and 3FG is becoming invisible, presumably no longer having the time for RMIR.
Well, the world develops. It is not only that "we" are getting older, but ten years ago, we could not even imagine what has happened the last years. Among other things, IR as a method for controlling "things" is slowly vanishing. But we understand it much better, which also means that the low hanging fruits have been harvested.
mathdon
Expert
Posts: 4725
Joined: Tue Jul 22, 2008 8:53 am
Location: Cambridge, UK

Post by mathdon »

Barf wrote:Well, the world develops. It is not only that "we" are getting older, but ten years ago, we could not even imagine what has happened the last years. Among other things, IR as a method for controlling "things" is slowly vanishing. But we understand it much better, which also means that the low hanging fruits have been harvested.
It's a good thing then that I now do my RMIR development work for my own interest, to keep my brain active, rather than because I think it will be useful to anyone :roll: .
Graham
mathdon
Expert
Posts: 4725
Joined: Tue Jul 22, 2008 8:53 am
Location: Cambridge, UK

Post by mathdon »

I have had a problem getting the error file to display with your new link. I suspect this is specifically a Windows 11 problem. I have traced it to the fact that there was no application assigned to open a .err file. I needed to set Notepad as a default app for .err files, then it worked. As far as I can recall, Win 10 and earlier had Notepad assigned to .err files by default as I cannot recall ever needing to set anything to do it.
Graham
HamburgerHelper1
Posts: 707
Joined: Sat Feb 22, 2014 2:58 pm

Fix to RMIR for direct GUI access to rmaster.err

Post by HamburgerHelper1 »

Sorry Graham that I have not responded
Your additions to RMIR are greatly appreciated and most definitely will be of use to me
I have a lot of bad things going on in my life right now and have been preoccupied with more pressing matters
Rest assured your work does indeed get noticed
Randy
Barf
Expert
Posts: 1522
Joined: Fri Oct 24, 2008 1:54 pm
Location: Munich, Germany
Contact:

Post by Barf »

Graham, the only really idiot proof solution would be to rename rmaster.err to something like rmaster_err.txt. I do not know if an idiot proof solution is needed however.
mathdon
Expert
Posts: 4725
Joined: Tue Jul 22, 2008 8:53 am
Location: Cambridge, UK

Post by mathdon »

I realize that! I may update the tooltip to mention this, however, as I may not be the only user caught out by this.
Graham
Post Reply