[ https://issues.apache.org/jira/browse/PIVOT-994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16293487#comment-16293487 ]
Roger Whitcomb commented on PIVOT-994: -------------------------------------- Note: running the "alert_prompt_test.bxml" file using ScriptApplication does not have this problem. So, likely this has to do with the specific code/environment in BXMLExplorer. > BXMLExplorer is getting a null display for a visible owner window. > ------------------------------------------------------------------ > > Key: PIVOT-994 > URL: https://issues.apache.org/jira/browse/PIVOT-994 > Project: Pivot > Issue Type: Bug > Components: core-beans > Affects Versions: 2.0.4, 2.1 > Environment: All > Reporter: Roger Whitcomb > Assignee: Roger Whitcomb > Priority: Minor > Fix For: 2.1 > > > Run the BXML Explorer Tutorial application. Open up the > "org/apache/pivot/tests/alert_prompt_test.bxml" file and try to bring up any > of the alerts or prompts. There will be an IllegalArgumentException that > "display is null." > The stack trace (for 2.0.x) shows this: > java.lang.IllegalArgumentException: display is null. > at org.apache.pivot.wtk.Window.open(Window.java:630) > at org.apache.pivot.wtk.Dialog.open(Dialog.java:186) > at org.apache.pivot.wtk.Alert.alert(Alert.java:359) > at org.apache.pivot.wtk.Alert.alert(Alert.java:331) > at jdk.nashorn.internal.scripts.Script$3$\^eval\_.:program(<eval>:1) > at > jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637) > at > jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494) > at > jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393) > at > jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449) > at > jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406) > at > jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402) > at > jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155) > at javax.script.AbstractScriptEngine.eval(Unknown Source) > at > org.apache.pivot.beans.BXMLSerializer$AttributeInvocationHandler.invoke(BXMLSerializer.java:156) > This sequence shows that "owner.getDisplay()" is returning null at > Alert.open() time, even though the owner window is clearly visible at the > time. > This could possibly be due to Nashorn scripting issues with Java 8, since the > "window" variable would be set in the JS namespace, but this doesn't really > explain why the "display" value is null, and not the "window" value itself. -- This message was sent by Atlassian JIRA (v6.4.14#64029)