I’m having the same problem as wutklumpen and conkerns above.
I define my popup as follows:
<popup id="group_member_context" childLayout="absolute-inside" width="100px">
<interact onClick="closePopup()" onSecondaryClick="closePopup()" onTertiaryClick="closePopup()"/>
<control id="#menu" name="niftyMenu" />
</popup>
(which is almost copied from the wiki guide)
In my Java code I call the following methods:
nifty.createPopup("group_member_context");
My stacktrace is:
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
at de.lessvoid.nifty.loaderv2.types.XmlBaseType.<init>(XmlBaseType.java:15)
at de.lessvoid.nifty.loaderv2.types.ElementType.<init>(ElementType.java:40)
at de.lessvoid.nifty.loaderv2.types.PopupType.<init>(PopupType.java:14)
at de.lessvoid.nifty.Nifty.createPopupFromType(Nifty.java:810)
at de.lessvoid.nifty.Nifty.createAndAddPopup(Nifty.java:863)
at de.lessvoid.nifty.Nifty.createPopup(Nifty.java:838)
I tried registering the popup first (with nifty.registerPopup(PopupType type)), but that didn’t seem to help.
Has anyone found a reason for the error and a solution?