Project

General

Profile

Bug #2729

Bug #2677: fix drawing and functional differences between P2J GUI and 4GL GUI

alert-box usage is broken

Added by Greg Shah over 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:

Related issues

Related to User Interface - Feature #2560: implement GUI DIALOG-BOX support Closed 04/29/2015

History

#1 Updated by Greg Shah over 8 years ago

See #1811-1258 and #1811-1262

The recreate is available via editorWidget.p program in note 1262.

#2 Updated by Greg Shah over 8 years ago

  • Assignee set to Hynek Cihlar

If this is alert-box related, please resolve it as part of #2560 (if your other fixes for alert-box don't already fix it).

If it is not alert-box related, then do let me know and I may reassign it.

#3 Updated by Greg Shah over 8 years ago

Please also test/fix the code in #1801-76 which is another abend (hopefully related).

#4 Updated by Hynek Cihlar over 8 years ago

Alert-box has been fixed with task branch 2560a and checked in to trunk as revision 10948.

#5 Updated by Greg Shah over 8 years ago

Something is wrong. I cannot recreate your success.

Using the trunk rev 10948 (which has the alert-box fixes) I tried to run simpler_alert_box.p, which is this code:

message "Hello World!" 
        update res as logical view-as alert-box information buttons yes-no.
message "Result =" res.

It abends with this:

Oct 19, 2015 5:34:12 PM Dispatcher.processInbound() 
SEVERE: {main} Unexpected throwable.
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:76)
        at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:705)
        at com.goldencode.p2j.net.Conversation.block(Conversation.java:319)
        at com.goldencode.p2j.net.Conversation.waitMessage(Conversation.java:257)
        at com.goldencode.p2j.net.Queue.transactImpl(Queue.java:1128)
        at com.goldencode.p2j.net.Queue.transact(Queue.java:585)
        at com.goldencode.p2j.net.BaseSession.transact(BaseSession.java:223)
        at com.goldencode.p2j.net.HighLevelObject.transact(HighLevelObject.java:163)
        at com.goldencode.p2j.net.RemoteObject$RemoteAccess.invokeCore(RemoteObject.java:1425)
        at com.goldencode.p2j.net.InvocationStub.invoke(InvocationStub.java:97)
        at com.sun.proxy.$Proxy4.standardEntry(Unknown Source)
        at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:277)
        at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:100)
        at com.goldencode.p2j.main.ClientDriver.start(ClientDriver.java:201)
        at com.goldencode.p2j.main.CommonDriver.process(CommonDriver.java:398)
        at com.goldencode.p2j.main.ClientDriver.process(ClientDriver.java:95)
        at com.goldencode.p2j.main.ClientDriver.main(ClientDriver.java:267)
Caused by: java.lang.NullPointerException
        at com.goldencode.p2j.ui.client.UiUtils.getData(UiUtils.java:801)
        at com.goldencode.p2j.ui.client.gui.AlertBoxGuiImpl.createIconWidget(AlertBoxGuiImpl.java:333)
        at com.goldencode.p2j.ui.client.gui.AlertBoxGuiImpl.init(AlertBoxGuiImpl.java:290)
        at com.goldencode.p2j.ui.client.gui.AlertBoxGuiImpl.<init>(AlertBoxGuiImpl.java:118)
        at com.goldencode.p2j.ui.client.gui.GuiWidgetFactory.createAlertBox(GuiWidgetFactory.java:324)
        at com.goldencode.p2j.ui.client.gui.GuiWidgetFactory.createAlertBox(GuiWidgetFactory.java:77)
        at com.goldencode.p2j.ui.chui.ThinClient$12.run(ThinClient.java:6706)
        at com.goldencode.p2j.ui.chui.ThinClient.eventBracket(ThinClient.java:13685)
        at com.goldencode.p2j.ui.chui.ThinClient.eventBracket(ThinClient.java:13658)
        at com.goldencode.p2j.ui.chui.ThinClient.messageBox(ThinClient.java:6700)
        ... 21 more

#6 Updated by Hynek Cihlar over 8 years ago

Greg Shah wrote:

Something is wrong. I cannot recreate your success.

Using the trunk rev 10948 (which has the alert-box fixes) I tried to run simpler_alert_box.p, which is this code:

[...]

It abends with this:

[...]

It looks like you don't have the icon files on classpath. There are png files in src/com/goldencode/p2j/ui/client/gui. For example error.png.

#7 Updated by Greg Shah over 8 years ago

They should always be loaded from the jar itself. We won't expect users to distribute our icons in the file system. The jar is enough for all our other images. Please fix it.

#8 Updated by Hynek Cihlar over 8 years ago

Greg Shah wrote:

They should always be loaded from the jar itself. We won't expect users to distribute our icons in the file system. The jar is enough for all our other images. Please fix it.

I see, build.xml probably doesn't include the icon files in the jar. I will fix this.

#9 Updated by Hynek Cihlar over 8 years ago

Hynek Cihlar wrote:

Greg Shah wrote:

They should always be loaded from the jar itself. We won't expect users to distribute our icons in the file system. The jar is enough for all our other images. Please fix it.

I see, build.xml probably doesn't include the icon files in the jar. I will fix this.

The image files are included in build.xml. Checked in to #1811s revision 11001.

#10 Updated by Greg Shah over 8 years ago

OK, this is now the result. It is the same as #2756 and #1811-1546

Oct 20, 2015 12:46:28 PM Dispatcher.processInbound() 
SEVERE: {main} Unexpected throwable.
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.goldencode.p2j.util.MethodInvoker.invoke(MethodInvoker.java:76)
        at com.goldencode.p2j.net.Dispatcher.processInbound(Dispatcher.java:705)
        at com.goldencode.p2j.net.Conversation.block(Conversation.java:319)
        at com.goldencode.p2j.net.Conversation.waitMessage(Conversation.java:257)
        at com.goldencode.p2j.net.Queue.transactImpl(Queue.java:1128)
        at com.goldencode.p2j.net.Queue.transact(Queue.java:585)
        at com.goldencode.p2j.net.BaseSession.transact(BaseSession.java:223)
        at com.goldencode.p2j.net.HighLevelObject.transact(HighLevelObject.java:163)
        at com.goldencode.p2j.net.RemoteObject$RemoteAccess.invokeCore(RemoteObject.java:1425)
        at com.goldencode.p2j.net.InvocationStub.invoke(InvocationStub.java:97)
        at com.sun.proxy.$Proxy4.standardEntry(Unknown Source)
        at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:277)
        at com.goldencode.p2j.main.ClientCore.start(ClientCore.java:100)
        at com.goldencode.p2j.main.ClientDriver.start(ClientDriver.java:201)
        at com.goldencode.p2j.main.CommonDriver.process(CommonDriver.java:398)
        at com.goldencode.p2j.main.ClientDriver.process(ClientDriver.java:95)
        at com.goldencode.p2j.main.ClientDriver.main(ClientDriver.java:267)
Caused by: java.lang.RuntimeException: No renderer is registered for id = -1
        at com.goldencode.p2j.ui.client.gui.driver.GuiPrimitivesImpl.getWindowEmulator(GuiPrimitivesImpl.java:208)
        at com.goldencode.p2j.ui.client.gui.driver.GuiPrimitivesImpl.selectWindow(GuiPrimitivesImpl.java:275)
        at com.goldencode.p2j.ui.client.gui.driver.AbstractGuiDriver.selectWindow(AbstractGuiDriver.java:1624)
        at com.goldencode.p2j.ui.client.widget.AbstractWidget.getTextWidth(AbstractWidget.java:2201)
        at com.goldencode.p2j.ui.client.widget.AbstractWidget.getTextWidthNative(AbstractWidget.java:1787)
        at com.goldencode.p2j.ui.client.gui.ButtonGuiImpl.width(ButtonGuiImpl.java:1254)
        at com.goldencode.p2j.ui.client.Button.<init>(Button.java:193)
        at com.goldencode.p2j.ui.client.gui.ButtonGuiImpl.<init>(ButtonGuiImpl.java:145)
        at com.goldencode.p2j.ui.client.gui.GuiWidgetFactory.createButton(GuiWidgetFactory.java:295)
        at com.goldencode.p2j.ui.client.gui.GuiWidgetFactory.createButton(GuiWidgetFactory.java:77)
        at com.goldencode.p2j.ui.client.AlertBoxCommons.createButton(AlertBoxCommons.java:379)
        at com.goldencode.p2j.ui.client.AlertBoxCommons.createButtonSet(AlertBoxCommons.java:182)
        at com.goldencode.p2j.ui.client.gui.AlertBoxGuiImpl.init(AlertBoxGuiImpl.java:274)
        at com.goldencode.p2j.ui.client.gui.AlertBoxGuiImpl.<init>(AlertBoxGuiImpl.java:118)
        at com.goldencode.p2j.ui.client.gui.GuiWidgetFactory.createAlertBox(GuiWidgetFactory.java:324)
        at com.goldencode.p2j.ui.client.gui.GuiWidgetFactory.createAlertBox(GuiWidgetFactory.java:77)
        at com.goldencode.p2j.ui.chui.ThinClient$12.run(ThinClient.java:6717)
        at com.goldencode.p2j.ui.chui.ThinClient.eventBracket(ThinClient.java:13696)
        at com.goldencode.p2j.ui.chui.ThinClient.eventBracket(ThinClient.java:13669)
        at com.goldencode.p2j.ui.chui.ThinClient.messageBox(ThinClient.java:6711)
        ... 21 more

#11 Updated by Hynek Cihlar over 8 years ago

Greg Shah wrote:

OK, this is now the result. It is the same as #2756 and #1811-1546

[...]

Fixed in 1811s revision 11002. See #1811 notes 1546, 1547.

#12 Updated by Greg Shah over 8 years ago

  • Status changed from New to Closed

#13 Updated by Greg Shah over 8 years ago

  • % Done changed from 0 to 100

#14 Updated by Greg Shah over 7 years ago

  • Target version changed from Milestone 12 to GUI Support for a Complex ADM2 App

Also available in: Atom PDF