RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Sat Feb 21, 2026 10:43 pm

All times are UTC





Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: 7-14-2006
PostPosted: Fri Jul 14, 2006 8:27 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 4:33 pm
Posts: 2079
Location: Palo, IA
Started working on ECU definition manager to allow multiple definition files and prioritize them. ie, it'll search from the first file in the list first, and on down. The manager is pretty much finished, it saves and loads the settings correctly, but the XML parser needs to be fixed to work with multiple files (it should crash if you try to open an image with the current source).

This code is not up to date. I'll need to merge these with the current files when I get home and then check them in to SVN.


You do not have the required permissions to view the files attached to this post.

_________________
- Jared


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 15, 2006 12:05 am 
Offline
Experienced
User avatar

Joined: Thu Jun 29, 2006 9:41 pm
Posts: 273
Will this search in the next file when a ECU definition is not found in the first one only, or if a XML parse exception is present also?

_________________
Stefano
05 WRX (AJ880)
Caracas, Venezuela


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 15, 2006 3:07 am 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 4:33 pm
Posts: 2079
Location: Palo, IA
Yeah, it'll search through the files in order until it finds the right one.

_________________
- Jared


Top
 Profile  
 
 Post subject: settings.xml not created under normal File->Exit
PostPosted: Fri Jul 21, 2006 1:36 pm 
Offline
Newbie

Joined: Thu Jul 20, 2006 12:14 pm
Posts: 5
Hi there.
The settings.xml file is created when someone hits the "X" button on its window,
but not when someone normal File->Exit(s).

I run on FreeBSD and I have not tested it on linux/windows, however i bet
the situation will be identical there as well.

The problem lies in that EcuEditorMenuBar just calls System.exit(0); on exit
instead of calling DOMSettingsBuilder.buildSettings.

Changes in ECUEditor.java
==========================
Code:
   public void handleExit() {
      getSettings().setSplitPaneLocation(splitPane.getDividerLocation());
      if (getExtendedState() == JFrame.MAXIMIZED_BOTH)          
      getSettings().setWindowMaximized(true);
      else {
         getSettings().setWindowMaximized(false);
         getSettings().setWindowSize(getSize());
         getSettings().setWindowLocation(getLocation());
      }
       
      DOMSettingsBuilder builder = new DOMSettingsBuilder();
      try {
         JProgressPane progress = new JProgressPane(this, "Saving settings...", "Saving settings...");           
         builder.buildSettings(settings, new File("./settings.xml"), progress, version);
           } catch (IOException ex) { }
   }
   
   public void windowClosing(WindowEvent e) {
      handleExit();
   }


Changes in ECUEditorMenuBar.java
==================================
Code:
   } else if (e.getSource() == exit) {
      parent.handleExit();
      System.exit(0);
           
   }


(I coud also send a little patch in diff format).

Kudos to the RomRaider staff!!!!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 21, 2006 2:29 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 4:33 pm
Posts: 2079
Location: Palo, IA
I'll go ahead and make that change.. I'm surprised it doesn't create the settings, though, because buildSettings is called in ECUEditor.windowClosing... Weird. Thanks though!

_________________
- Jared


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 21, 2006 2:45 pm 
Offline
Newbie

Joined: Thu Jul 20, 2006 12:14 pm
Posts: 5
qoncept wrote:
I'll go ahead and make that change.. I'm surprised it doesn't create the settings, though, because buildSettings is called in ECUEditor.windowClosing... Weird. Thanks though!


Yes but System.exit(0);
from ECUEditorMenuBar.java will never send any events to ECUEditor's JFrame,
inorder for ECUEditor.windowClosing() to be called.

However as i said i haven't got any handy linux/windows with java 5 installed
around in order to test if the problem exists for those platforms as well,
could you confirm that ?

Cheers


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 21, 2006 2:47 pm 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 4:33 pm
Posts: 2079
Location: Palo, IA
Same thing in Windows. I've changed the code and it'll be in the next release.

_________________
- Jared


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 21, 2006 2:51 pm 
Offline
Newbie

Joined: Thu Jul 20, 2006 12:14 pm
Posts: 5
Cool :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl