This question is not answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 103 - Pages: 7 [ Previous | 1 2 3 4 5 6 7 | Next ] - Last Post: 23 Jul 19, 15:33 Last Post By: AndreWolff
AndreWolff

Posts: 2,360
Registered: 14-Dec-2007
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 20 Jul 19, 16:16   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
One thing I overlooked was the skin being used, try another skin from another developer.
It depends indeed on the skin as you can see in the first line of the crash log:
Exception in thread "AWT-EventQueue-0" java.security.PrivilegedActionException: 
bsh.EvalError: Command not found: saveUI() : at Line: 66 : in file: inline evaluation of: ``/*   
This script produces the user interface for the PhotoSwipe skin.   *   *  . . . '' : saveUI ( )
It can't find function SaveUI used in the Panoramic image custom panel.

My userpanel code was derived from an old thread of RobM
And indeed there is no function SaveUI in my onload.bsh file.

Is or was SaveUI some function of the jAlbum nucleus?

In normal use if I change something in my Panoramic panel I have the same type of silent crash:
Exception in thread "AWT-EventQueue-0" java.lang.reflect.UndeclaredThrowableException
	at com.sun.proxy.$Proxy15.focusGained(Unknown Source)
	at java.desktop/java.awt.AWTEventMulticaster.focusGained(Unknown Source)
	at java.desktop/java.awt.Component.processFocusEvent(Unknown Source)
saveui


I can't remember that I had this crash in previous versions, so I wonder is function SaveUI removed in one of the latest versions?

The user panel code is too complicated for me to understand what happens here, so help is appreciated!

Edit: link corrected.

Edited by: AndreWolff on 20-Jul-2019 16:22

Edited by: AndreWolff on 20-Jul-2019 16:27
RobM

Posts: 4,197
Registered: 4-Aug-2006
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 20 Jul 19, 17:05   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
The API is http://jalbum.net/api/se/datadosen/jalbum/JCustomPanel.html#saveUI()

The thread quoted is three years old, and the title sums up my knowledge quite well.
RobM

Posts: 4,197
Registered: 4-Aug-2006
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 20 Jul 19, 18:44   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
The API is http://jalbum.net/api/se/datadosen/jalbum/JCustomPanel.html#saveUI()

The thread quoted is three years old, and the title sums up my knowledge quite well.

You are probably missing some import statements, in Netbeans you can use a fix imports command. That will add any needed and remove those no used.
AndreWolff

Posts: 2,360
Registered: 14-Dec-2007
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 20 Jul 19, 18:55   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
The API is http://jalbum.net/api/se/datadosen/jalbum/JCustomPanel.html#saveUI()

The thread quoted is three years old, and the title sums up my knowledge quite well.

Thanks for the link.

I have at the start of my onload.bsh module the statement
import se.datadosen.component.*;
so I don't understand why that function is not found.
RobM

Posts: 4,197
Registered: 4-Aug-2006
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 20 Jul 19, 19:03   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Try import se.datadosen.jalbum.JCustomPanel
AndreWolff

Posts: 2,360
Registered: 14-Dec-2007
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 20 Jul 19, 19:21   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
Try import se.datadosen.jalbum.JCustomPanel
That was the first thing I tried after I got your link, but it does not solve the problem.

Standard I use:
import se.datadosen.component.*;
import se.datadosen.util.*;
import se.datadosen.jalbum.*;
import se.datadosen.jalbum.event.*;
import javax.swing.filechooser.*;
import se.datadosen.io.*;
import edu.stanford.ejalbert.*;
As a test I added all imports of the Mirage skin, where SaveUI is also used:
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.KeyboardFocusManager;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
import javax.swing.ScrollPaneConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.CompoundBorder;
import se.datadosen.component.StateMonitor;
import se.datadosen.io.LinkFile;
import se.datadosen.jalbum.AlbumBean;
import se.datadosen.jalbum.AlbumObject;
import se.datadosen.jalbum.AlbumObjectProperties;
import se.datadosen.jalbum.CompiledScript;
import se.datadosen.jalbum.Config;
import se.datadosen.jalbum.JAlbumContext;
import se.datadosen.jalbum.JCustomPanel;
import se.datadosen.jalbum.ThumbnailFileView;
import se.datadosen.util.IO;
import se.datadosen.util.SmartResourceBundle;
But that did also not solve the problem.
RobM

Posts: 4,197
Registered: 4-Aug-2006
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 20 Jul 19, 20:47   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
RobM wrote:
Try import se.datadosen.jalbum.JCustomPanel
That was the first thing I tried after I got your link, but it does not solve the problem.

Standard I use:
codeimport se.datadosen.component.*;
import se.datadosen.util.*;
import se.datadosen.jalbum.*;
import se.datadosen.jalbum.event.*;
import javax.swing.filechooser.*;
import se.datadosen.io.*;
import edu.stanford.ejalbert.*;

In your Netbeans project select the skin's customUI.java file then run the menu command 'Source/Fix imports'. Though I don't know what you are doing in your code, in that file of my Sprint skin if I remove the line 'import se.datadosen.jalbum.JCustomPanel' I get a warning next to saveUI() and the skin will not compile.
RobM

Posts: 4,197
Registered: 4-Aug-2006
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 21 Jul 19, 00:21   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
I have managed to make your SS4 skin work without the error, the solution is below.
However, if you used Netbeans you would not have these types of problems.

Solution:
In onload.bsh add these imports
import se.datadosen.component.StateMonitor;
import se.datadosen.jalbum.JCustomPanel;


Move the blocks of code
// Make some convenient references available
JAlbumContext context = JAlbumContext.getInstance();
PluginContext pc = context.getPluginContext();
EditPanel editPanel = pc.getEditPanel();
 
CustomUI CustomUI = new CustomUI(context);
// Install custom panel in Jalbum's edit panel
editPanel.addCustomTab("Panoramic image", CustomUI);
 
// Make some convenient references available
JAlbumContext context = JAlbumContext.getInstance();
PluginContext pc = context.getPluginContext();
EditPanel editPanel = pc.getEditPanel();
 
CustomUI customUI = new CustomUI(context);
// Install custom panel in Jalbum's edit panel
editPanel.addCustomTab("Link", customUI);
to the end of the onload.bsh file, that is after
// Finally install components into JAlbum
window.setSkinUI(ui);


Note, I have not looked for other imports that might be missing, you cannot use a standard set of imports, it just doesn't work that way.

Edited by: jGromit on 20-Jul-2019 18:25 - onload.bsh, not init.bsh

Edited by: RobM on 20-Jul-2019 23:30
Oops, sorry - late and drunk ;)

Edited by: jGromit on 20-Jul-2019 18:32
Early here. But also drunk. Temps hit a comfy 35°C this afternoon. Many gins and tonics....
AndreWolff

Posts: 2,360
Registered: 14-Dec-2007
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 21 Jul 19, 10:05   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
I have managed to make your SS4 skin work without the error, the solution is below.
However, if you used Netbeans you would not have these types of problems.
Thanks for your efforts.

Unfortunately your solution does not work: both panels do have now the same contents, the Panoramic panel gets the same variables as the link panel.

If I remove the code of the link panel completely, I get one panoramic user panel, but the silent crash is still there if I change the Max. image with or apply your tool in a video.

If your version works OK, then please attach your changed files in a message.
karlmistelberger

Posts: 178
Registered: 5-Dec-2013
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 21 Jul 19, 10:28   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
AndreWolff wrote:
davidekholm wrote:
It's not particularly clean to have to rely on an external executable for this. Better to have the Metadata-extractor library updated to handle this.
Sure, but if the Metadata-extractor library can’t be updated yet, why can’t you modify Robs code to use it internally in the jAlbum program?
Because it uses exiftool under the hood which adds complexity and dependencies I wish to avoid. We have enough support cases anyway.

Ever considered ExifTool - Enhanced Java Integration for Phil Harvey s ExifTool ?
RobM

Posts: 4,197
Registered: 4-Aug-2006
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 21 Jul 19, 11:18   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
RobM wrote:
I have managed to make your SS4 skin work without the error, the solution is below.
However, if you used Netbeans you would not have these types of problems.
Thanks for your efforts.

Unfortunately your solution does not work: both panels do have now the same contents, the Panoramic panel gets the same variables as the link panel.

If I remove the code of the link panel completely, I get one panoramic user panel, but the silent crash is still there if I change the Max. image with or apply your tool in a video.

If your version works OK, then please attach your changed files in a message.

When I said it works, what I meant was the error you reported has gone. You need to change the name of one of your
CustomUI customUI = new CustomUI(context);
, you can’t have two different things sharing a single variable name.

Also, you only need one block of
Make some convenient references available
.
RobM

Posts: 4,197
Registered: 4-Aug-2006
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 21 Jul 19, 11:29   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
And that still might not be enough to fix it fully as I am replying from my iPad not my computer - so I can’t see your onload.bsh file. You should move from interpreted to compiled UI.
AndreWolff

Posts: 2,360
Registered: 14-Dec-2007
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 21 Jul 19, 12:44   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
You should move from interpreted to compiled UI.
I have neither the knowledge nor the time to do that.
This code was working years without problems in 3 skins, but apparently a change in one of the recent jAlbum versions is giving now problems.
RobM

Posts: 4,197
Registered: 4-Aug-2006
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 21 Jul 19, 14:23   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
RobM wrote:
You should move from interpreted to compiled UI.
I have neither the knowledge nor the time to do that.
This code was working years without problems in 3 skins, but apparently a change in one of the recent jAlbum versions is giving now problems.
Please confirm the accuracy of that statement; are you saying the problem now occurs in your skins without using my external tool, and that they worked with previous versions of jAlbum when using the gps tool.
JeffTucker

Posts: 8,365
Registered: 31-Jan-2006
Re: Make it possible to add GPS coordinates to movies and pictures in jAlbum
Posted: 21 Jul 19, 14:27   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Just did a quick experiment. I reinstalled jAlbum 17.1.5, created a project with Slide Show 4, and tried to use the "Panoramic image" custom panel. Got multiple errors when I checked one of the boxes, then clicked in the "Max. image width" field. So these are not new problems.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums