You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Roger Whitcomb (JIRA)" <ji...@apache.org> on 2017/04/24 23:08:04 UTC
[jira] [Created] (PIVOT-994) BXMLExplorer is getting a null display
for a visible owner window.
Roger Whitcomb created PIVOT-994:
------------------------------------
Summary: 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, 2.0.5
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.3.15#6346)