[8u40] RFR: RT-39764: [macosx] Media crashes when changing EQ band center frequency
Kevin, Kirill, please review my fix for RT-39764. JIRA: https://javafx-jira.kenai.com/browse/RT-39764 Webrev: http://cr.openjdk.java.net/~ddehaven/RT-39764/rt.0/index.html -DrD-
Re: SplitPane layout question
Hi Scott, Thanks for your answer. Unfortunatly, I still couldn't fix this issue. I tried several things including setting the prefWidth/ prefHeight of the items to the expected value, but I couldn't stop the SplitPane to effectively hide the first and the third (last) item during a re-layout. The two dividers changed during the layoutChildren call as follows: Divider position changed: old value: 0.10857763300760044, new value: 0.004343105320304018 Divider position changed: old value: 0.8914223669923995, new value: 0.995656894679696 I had a look at the com.sun.javafx.scene.control.skin.SplitPaneSkin (source code provided with the JDK), but unfortunatly it's not easy there to see how the areas are calculated in this situation. You mentioned the min/ max sizes. Just for testing purposes I also set the minHeight/ minWidth but this only had the effect that I couldn't readjust the divider with the mouse anymore. During the re-layout the issue still persisted. What else could I try? -Florian Am Montag, 22. Dezember 2014, 07.19:37 schrieb Scott Palmer: The min/max sizes of the children are probably being respected. Scott On Dec 22, 2014, at 7:13 AM, Florian Brunner fbrunnerl...@gmx.ch wrote: Hi, Sometimes when I'm setting the divider positions of a SplitPane programmatically my value get overridden again by some JavaFX internal layout code. For debugging purposes I've added a listener to the position property of the divider and have thrown a RuntimeException to see the stack trace. It looks like this: -- at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(Expr essionHelper.java:361) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHe lper.java:81) at javafx.beans.property.DoublePropertyBase.fireValueChangedEvent(DoublePrope rtyBase.java:106) at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.ja va:113) at javafx.beans.property.DoublePropertyBase.set(DoublePropertyBase.java:146) at javafx.scene.control.SplitPane$Divider.setPosition(SplitPane.java:486) at com.sun.javafx.scene.control.skin.SplitPaneSkin.setAbsoluteDividerPos(Spli tPaneSkin.java:310) at com.sun.javafx.scene.control.skin.SplitPaneSkin.setupContentAndDividerForL ayout(SplitPaneSkin.java:502) at com.sun.javafx.scene.control.skin.SplitPaneSkin.layoutChildren(SplitPaneSk in.java:817) at javafx.scene.control.Control.layoutChildren(Control.java:589) at javafx.scene.Parent.layout(Parent.java:1074) at javafx.scene.Parent.layout(Parent.java:1080) at javafx.scene.Parent.layout(Parent.java:1080) at javafx.scene.Parent.layout(Parent.java:1080) at javafx.scene.Parent.layout(Parent.java:1080) at javafx.scene.Parent.layout(Parent.java:1080) at javafx.scene.Parent.layout(Parent.java:1080) at javafx.scene.Parent.layout(Parent.java:1080) at javafx.scene.Parent.layout(Parent.java:1080) at javafx.scene.Scene.doLayoutPass(Scene.java:532) at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2363) at com.sun.javafx.tk.Toolkit.lambda$runPulse$28(Toolkit.java:314) at com.sun.javafx.tk.Toolkit$$Lambda$230/25595560.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:313) at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:340) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:451 ) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:431 ) at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$363(QuantumTool kit.java:298) at com.sun.javafx.tk.quantum.QuantumToolkit$$Lambda$59/174792896.run(Unknown Source) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.ja va:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$45(GtkApplication.java:126 ) at com.sun.glass.ui.gtk.GtkApplication$$Lambda$55/1472148546.run(Unknown Source) at java.lang.Thread.run(Thread.java:745) -- It doesn't seem to get triggered by some code of mine (at least not directly according to the stack trace). Why is this re-layout happing here? Why does it override the values I've set for the divider positions? How can stop this? Thanks for some insights. -Florian
Re: [8u40] RFR: RT-39764: [macosx] Media crashes when changing EQ band center frequency
I think Kirill's still out, Alexander can you review this? -DrD- Kevin, Kirill, please review my fix for RT-39764. JIRA: https://javafx-jira.kenai.com/browse/RT-39764 Webrev: http://cr.openjdk.java.net/~ddehaven/RT-39764/rt.0/index.html -DrD-
Re: How to handle file open requests on MacOS
What is Application.getApplication() here? The JavaFX Application class does not have a setOpenFileHandler method. Is that a Mac-specific API? It's too bad that 8u40 won't have this. Being able to easily open double clicked files is pretty basic. Perhaps post 8u40 the JFX team could go through Scene Builder and identify everywhere it relies on internal APIs or custom magic and suck it into the core API, as then you'd have confidence that an app of real complexity can be done entirely with documented stuff.
Re: How to handle file open requests on MacOS
Oh, yes. Mac has it's own Applicaiton class. Here's the imports for the second file... import com.apple.eawt.AppEvent; import com.apple.eawt.Application; import java.io.File; import java.util.List; import javax.swing.SwingUtilities; The com.apple.eawt stuff is shipped with Oracle JRE and JDK, but like I said in my previous mail you need to pass a flag to the compiler to turn off it's index and read the jar. The JavaDoc has gone MIA though -- https://bugs.openjdk.java.net/browse/JDK-8027638 but you can peruse the source code to see the details, it's all OpenJDK - http://hg.openjdk.java.net/jdk8u/jdk8u40/jdk/file/564bca490631/src/macosx/classes/com/apple/eawt On Jan 5, 2015, at 10:43 AM, Mike Hearn m...@plan99.net wrote: What is Application.getApplication() here? The JavaFX Application class does not have a setOpenFileHandler method. Is that a Mac-specific API? It's too bad that 8u40 won't have this. Being able to easily open double clicked files is pretty basic. Perhaps post 8u40 the JFX team could go through Scene Builder and identify everywhere it relies on internal APIs or custom magic and suck it into the core API, as then you'd have confidence that an app of real complexity can be done entirely with documented stuff.
Re: How to handle file open requests on MacOS
Scene Builder doesn't do it this way - AFAICT you're only allowed to have one such event handler registered with the OS and JavaFX already registers one ... it just doesn't expose the resulting Java events via public API. On Mon, Jan 5, 2015 at 6:50 PM, Danno Ferrin danno.fer...@oracle.com wrote: Oh, yes. Mac has it's own Applicaiton class. Here's the imports for the second file... import com.apple.eawt.AppEvent; import com.apple.eawt.Application; import java.io.File; import java.util.List; import javax.swing.SwingUtilities; The com.apple.eawt stuff is shipped with Oracle JRE and JDK, but like I said in my previous mail you need to pass a flag to the compiler to turn off it's index and read the jar. The JavaDoc has gone MIA though -- https://bugs.openjdk.java.net/browse/JDK-8027638 but you can peruse the source code to see the details, it's all OpenJDK - http://hg.openjdk.java.net/jdk8u/jdk8u40/jdk/file/564bca490631/src/macosx/classes/com/apple/eawt On Jan 5, 2015, at 10:43 AM, Mike Hearn m...@plan99.net wrote: What is Application.getApplication() here? The JavaFX Application class does not have a setOpenFileHandler method. Is that a Mac-specific API? It's too bad that 8u40 won't have this. Being able to easily open double clicked files is pretty basic. Perhaps post 8u40 the JFX team could go through Scene Builder and identify everywhere it relies on internal APIs or custom magic and suck it into the core API, as then you'd have confidence that an app of real complexity can be done entirely with documented stuff.
Re: How to handle file open requests on MacOS
This code works inside of a JavaFX application too, just tried it locally. You may be thinking of an older iteration of the apple application listener classes or perhaps the native level of the code. On Jan 5, 2015, at 11:04 AM, Mike Hearn m...@plan99.net wrote: Scene Builder doesn't do it this way - AFAICT you're only allowed to have one such event handler registered with the OS and JavaFX already registers one ... it just doesn't expose the resulting Java events via public API. On Mon, Jan 5, 2015 at 6:50 PM, Danno Ferrin danno.fer...@oracle.com wrote: Oh, yes. Mac has it's own Applicaiton class. Here's the imports for the second file... import com.apple.eawt.AppEvent; import com.apple.eawt.Application; import java.io.File; import java.util.List; import javax.swing.SwingUtilities; The com.apple.eawt stuff is shipped with Oracle JRE and JDK, but like I said in my previous mail you need to pass a flag to the compiler to turn off it's index and read the jar. The JavaDoc has gone MIA though -- https://bugs.openjdk.java.net/browse/JDK-8027638 but you can peruse the source code to see the details, it's all OpenJDK - http://hg.openjdk.java.net/jdk8u/jdk8u40/jdk/file/564bca490631/src/macosx/classes/com/apple/eawt On Jan 5, 2015, at 10:43 AM, Mike Hearn m...@plan99.net wrote: What is Application.getApplication() here? The JavaFX Application class does not have a setOpenFileHandler method. Is that a Mac-specific API? It's too bad that 8u40 won't have this. Being able to easily open double clicked files is pretty basic. Perhaps post 8u40 the JFX team could go through Scene Builder and identify everywhere it relies on internal APIs or custom magic and suck it into the core API, as then you'd have confidence that an app of real complexity can be done entirely with documented stuff.
Re: How to handle file open requests on MacOS
OK, then I might switch (or maybe not, as my current solution works ...) BTW I noticed that the javapacker ISS changes put the file association entries into HKEY_CLASSES_ROOT. Doing this results in an error half way through setup if you don't run the installer with admin privs. The current installer setup runs just fine with lowest privs, so it'd be perhaps nicer to put the registry entries under HKEY_CURRENT_USER\SOFTWARE\Classes instead: http://support.microsoft.com/kb/257592 On Mon, Jan 5, 2015 at 8:59 PM, Danno Ferrin danno.fer...@oracle.com wrote: This code works inside of a JavaFX application too, just tried it locally. You may be thinking of an older iteration of the apple application listener classes or perhaps the native level of the code. On Jan 5, 2015, at 11:04 AM, Mike Hearn m...@plan99.net wrote: Scene Builder doesn't do it this way - AFAICT you're only allowed to have one such event handler registered with the OS and JavaFX already registers one ... it just doesn't expose the resulting Java events via public API. On Mon, Jan 5, 2015 at 6:50 PM, Danno Ferrin danno.fer...@oracle.com wrote: Oh, yes. Mac has it's own Applicaiton class. Here's the imports for the second file... import com.apple.eawt.AppEvent; import com.apple.eawt.Application; import java.io.File; import java.util.List; import javax.swing.SwingUtilities; The com.apple.eawt stuff is shipped with Oracle JRE and JDK, but like I said in my previous mail you need to pass a flag to the compiler to turn off it's index and read the jar. The JavaDoc has gone MIA though -- https://bugs.openjdk.java.net/browse/JDK-8027638 but you can peruse the source code to see the details, it's all OpenJDK - http://hg.openjdk.java.net/jdk8u/jdk8u40/jdk/file/564bca490631/src/macosx/classes/com/apple/eawt On Jan 5, 2015, at 10:43 AM, Mike Hearn m...@plan99.net wrote: What is Application.getApplication() here? The JavaFX Application class does not have a setOpenFileHandler method. Is that a Mac-specific API? It's too bad that 8u40 won't have this. Being able to easily open double clicked files is pretty basic. Perhaps post 8u40 the JFX team could go through Scene Builder and identify everywhere it relies on internal APIs or custom magic and suck it into the core API, as then you'd have confidence that an app of real complexity can be done entirely with documented stuff.
Re: How to handle file open requests on MacOS
set the exe to install System Wide .. -Bwin.exe.systemWide=true via the CLI. This will cause the application to be installed with admin privleges. Can you open a bug for this (just cut and paste the e-mail) so it will work for local installs? On Jan 5, 2015, at 1:09 PM, Mike Hearn m...@plan99.net wrote: OK, then I might switch (or maybe not, as my current solution works ...) BTW I noticed that the javapacker ISS changes put the file association entries into HKEY_CLASSES_ROOT. Doing this results in an error half way through setup if you don't run the installer with admin privs. The current installer setup runs just fine with lowest privs, so it'd be perhaps nicer to put the registry entries under HKEY_CURRENT_USER\SOFTWARE\Classes instead: http://support.microsoft.com/kb/257592 On Mon, Jan 5, 2015 at 8:59 PM, Danno Ferrin danno.fer...@oracle.com wrote: This code works inside of a JavaFX application too, just tried it locally. You may be thinking of an older iteration of the apple application listener classes or perhaps the native level of the code. On Jan 5, 2015, at 11:04 AM, Mike Hearn m...@plan99.net wrote: Scene Builder doesn't do it this way - AFAICT you're only allowed to have one such event handler registered with the OS and JavaFX already registers one ... it just doesn't expose the resulting Java events via public API. On Mon, Jan 5, 2015 at 6:50 PM, Danno Ferrin danno.fer...@oracle.com wrote: Oh, yes. Mac has it's own Applicaiton class. Here's the imports for the second file... import com.apple.eawt.AppEvent; import com.apple.eawt.Application; import java.io.File; import java.util.List; import javax.swing.SwingUtilities; The com.apple.eawt stuff is shipped with Oracle JRE and JDK, but like I said in my previous mail you need to pass a flag to the compiler to turn off it's index and read the jar. The JavaDoc has gone MIA though -- https://bugs.openjdk.java.net/browse/JDK-8027638 but you can peruse the source code to see the details, it's all OpenJDK - http://hg.openjdk.java.net/jdk8u/jdk8u40/jdk/file/564bca490631/src/macosx/classes/com/apple/eawt On Jan 5, 2015, at 10:43 AM, Mike Hearn m...@plan99.net wrote: What is Application.getApplication() here? The JavaFX Application class does not have a setOpenFileHandler method. Is that a Mac-specific API? It's too bad that 8u40 won't have this. Being able to easily open double clicked files is pretty basic. Perhaps post 8u40 the JFX team could go through Scene Builder and identify everywhere it relies on internal APIs or custom magic and suck it into the core API, as then you'd have confidence that an app of real complexity can be done entirely with documented stuff.