Re: A possible critical bug for gwt-fabridge.
Hi Jihong, Perhaps a more appropriate place to report this gwt-fabridge bug would be on the project Issue Tracker. I'm sure the developers behind the project would be happy to be notified about a potentially critical issue. http://code.google.com/p/gwt-fabridge/issues/list Hope that helps, -Sumit Chandel On Thu, Feb 5, 2009 at 6:45 AM, Charlie Collins wrote: > > You missed my point there. I guess I should have said I don't know OR > care what gwt-fabridge is, but if you want help with it, you might as > on a forum that is relevant to it? > > On Feb 4, 1:37 pm, Jihong wrote: > > gwt-fabridge is a utility for gwt to access adobe swf file. See the > > following pagehttp://code.google.com/p/gwt-fabridge/ > > > > On Feb 4, 5:59 am, Charlie Collins wrote: > > > > > I don't know whatgwt-fabridgeis, but maybe that project has it's own > > > support list you can use for issues such as this? Not sure you will > > > get much response here. > > > > > On Feb 3, 4:00 pm, "Jihong Liu" wrote: > > > > > > Hi. I have a problem forgwt-fabridge. I think it may be a critical > > > > issue forgwt-fabridge. > > > > > > If a swf widget is added into a panel, and then add the panel into a > > > > container. And then remove the panel from the container, and then add > > > > the panel back into the container. Then the Null pointer error will > > > > occur at onInitialization()caused by the swf widget. I did a test > using > > > > the FABridgeDemo. In the FABridgeDemo, I added a button for removing > the > > > > swf widget. > > > > > > When start the program, first click the "Add new SWF", and everything > is > > > > ok. Then click the "Remove SWF", then the swf is removed. Then click > the > > > > "Add new SWF" again, then an error will happen. > > > > > > I have tried many ways, the only way to make it work is to create the > > > > swf widge again and using a different name if the widget has been > > > > removed. For example: > > > > > > java.util.Date date = new java.util.Date(); > > > > > > swfWidget = new > > > > SWFABridgeWidget("app.swf",400,400,"example"+date.getTime()); > > > > > > But it is not good at all. And the behavior is not the same as other > > > > regular gwt widgets. For other widgets, after they are put in a > panel. > > > > Then you can add/drop this panel into/from a container many times > > > > without re-create the inside widgets. > > > > > > I am really frustrated about this problem. Based on user's selection > we > > > > will add different panels into a container for display. It is really > > > > painful if we have to create the swf widgets again if the panel has > been > > > > dropped from the container once. > > > > > > I don't know whether the following code in > > > > pl.rmalinowski.gwt2swf.client.ui.SWFWidge causes problem or not. > > > > > > protected void onUnload() { > > > > > > // GWT.log("onUnload", null); > > > > > > getElement().removeChild(DOM.getFirstChild(getElement())); > > > > > > isSWFInjected = false; > > > > > > super.onUnload(); > > > > > > } > > > > > > The statement: > getElement().removeChild(DOM.getFirstChild(getElement())) > > > > removes the child from the widget. Thus after a swfwidget is removed > > > > from a panel, and then add the swf back, no child there. > > > > > > Following is the code in com.google.gwt.user.client.ui.ComplexPanel > > > > > > @Override > > > > > > public boolean remove(Widget w) { > > > > > > // Validate. > > > > > > if (w.getParent() != this) { > > > > > > return false; > > > > > > } > > > > > > // Orphan. > > > > > > orphan(w); > > > > > > // Physical detach. > > > > > > Element elem = w.getElement(); > > > > > > DOM.removeChild(DOM.getParent(elem), elem); > > > > > > // Logical detach. > > > > > > getChildren().remove(w); > > > > > > return true; > > > > > > } > > > > > > It sounds to me that the different between two programs is that in > > > > ComplexPanel, it removes the widget's element only, but in SWFWidge, > it > > > > removes the child of the widget's element. > > > > > > Thank you very much! > > > > > > Jihong Liu > > > > > > Following is the source code which causes problem > > > > > > package com.satmetrix.swfTest.client; > > > > > > import org.argunet.gwt.fabridge.client.SWFABridgeWidget; > > > > > > import org.argunet.gwt.fabridge.client.bridge.BridgeObject; > > > > > > import org.argunet.gwt.fabridge.client.bridge.BridgeParameter; > > > > > > import org.argunet.gwt.fabridge.client.bridge.BridgeParameterObject; > > > > > > import > org.argunet.gwt.fabridge.client.events.IInitializationListener; > > > > > > import org.argunet.gwt.fabridge.client.events.ISWFListener; > > > > > > import org.argunet.gwt.fabridge.client.utils.JSNIUtils; > > > > > > import com.google.gwt.core.client.EntryPoint; > > > > > > import com.google.gwt.core.client.JavaScriptObject; > > > > > > import com.google.gwt.user.client.Window; > > > > > > import com.google.gwt.user.client.ui.
Re: A possible critical bug for gwt-fabridge.
You missed my point there. I guess I should have said I don't know OR care what gwt-fabridge is, but if you want help with it, you might as on a forum that is relevant to it? On Feb 4, 1:37 pm, Jihong wrote: > gwt-fabridge is a utility for gwt to access adobe swf file. See the > following pagehttp://code.google.com/p/gwt-fabridge/ > > On Feb 4, 5:59 am, Charlie Collins wrote: > > > I don't know whatgwt-fabridgeis, but maybe that project has it's own > > support list you can use for issues such as this? Not sure you will > > get much response here. > > > On Feb 3, 4:00 pm, "Jihong Liu" wrote: > > > > Hi. I have a problem forgwt-fabridge. I think it may be a critical > > > issue forgwt-fabridge. > > > > If a swf widget is added into a panel, and then add the panel into a > > > container. And then remove the panel from the container, and then add > > > the panel back into the container. Then the Null pointer error will > > > occur at onInitialization()caused by the swf widget. I did a test using > > > the FABridgeDemo. In the FABridgeDemo, I added a button for removing the > > > swf widget. > > > > When start the program, first click the "Add new SWF", and everything is > > > ok. Then click the "Remove SWF", then the swf is removed. Then click the > > > "Add new SWF" again, then an error will happen. > > > > I have tried many ways, the only way to make it work is to create the > > > swf widge again and using a different name if the widget has been > > > removed. For example: > > > > java.util.Date date = new java.util.Date(); > > > > swfWidget = new > > > SWFABridgeWidget("app.swf",400,400,"example"+date.getTime()); > > > > But it is not good at all. And the behavior is not the same as other > > > regular gwt widgets. For other widgets, after they are put in a panel. > > > Then you can add/drop this panel into/from a container many times > > > without re-create the inside widgets. > > > > I am really frustrated about this problem. Based on user's selection we > > > will add different panels into a container for display. It is really > > > painful if we have to create the swf widgets again if the panel has been > > > dropped from the container once. > > > > I don't know whether the following code in > > > pl.rmalinowski.gwt2swf.client.ui.SWFWidge causes problem or not. > > > > protected void onUnload() { > > > > // GWT.log("onUnload", null); > > > > getElement().removeChild(DOM.getFirstChild(getElement())); > > > > isSWFInjected = false; > > > > super.onUnload(); > > > > } > > > > The statement: getElement().removeChild(DOM.getFirstChild(getElement())) > > > removes the child from the widget. Thus after a swfwidget is removed > > > from a panel, and then add the swf back, no child there. > > > > Following is the code in com.google.gwt.user.client.ui.ComplexPanel > > > > @Override > > > > public boolean remove(Widget w) { > > > > // Validate. > > > > if (w.getParent() != this) { > > > > return false; > > > > } > > > > // Orphan. > > > > orphan(w); > > > > // Physical detach. > > > > Element elem = w.getElement(); > > > > DOM.removeChild(DOM.getParent(elem), elem); > > > > // Logical detach. > > > > getChildren().remove(w); > > > > return true; > > > > } > > > > It sounds to me that the different between two programs is that in > > > ComplexPanel, it removes the widget's element only, but in SWFWidge, it > > > removes the child of the widget's element. > > > > Thank you very much! > > > > Jihong Liu > > > > Following is the source code which causes problem > > > > package com.satmetrix.swfTest.client; > > > > import org.argunet.gwt.fabridge.client.SWFABridgeWidget; > > > > import org.argunet.gwt.fabridge.client.bridge.BridgeObject; > > > > import org.argunet.gwt.fabridge.client.bridge.BridgeParameter; > > > > import org.argunet.gwt.fabridge.client.bridge.BridgeParameterObject; > > > > import org.argunet.gwt.fabridge.client.events.IInitializationListener; > > > > import org.argunet.gwt.fabridge.client.events.ISWFListener; > > > > import org.argunet.gwt.fabridge.client.utils.JSNIUtils; > > > > import com.google.gwt.core.client.EntryPoint; > > > > import com.google.gwt.core.client.JavaScriptObject; > > > > import com.google.gwt.user.client.Window; > > > > import com.google.gwt.user.client.ui.Button; > > > > import com.google.gwt.user.client.ui.ClickListener; > > > > import com.google.gwt.user.client.ui.Label; > > > > import com.google.gwt.user.client.ui.RootPanel; > > > > import com.google.gwt.user.client.ui.Widget; > > > > public class FABridgeDemo implements EntryPoint, IInitializationListener > > > { > > > > private final Button addNewSwf = new Button("Add new SWF"); > > > > private final Button removeSwf = new Button("Remove SWF"); > > > > private final Button setCheckBox = new Button("Set Checkbox > > > property"); > > > > private final Label sliderLabel = new Label("Slider Label"); > > > > priva
Re: A possible critical bug for gwt-fabridge.
Hi.. Iam new to FABridge.Now iam working on that,when i tried to use FABridge iam getting the exception as: [ERROR] Uncaught exception escaped java.lang.NullPointerException: null at com.example.client.SWFTest$2.onClick(SWFTest.java:75) at com.google.gwt.user.client.ui.ClickListenerCollection.fireClick(ClickListenerCollection.java:34) at com.google.gwt.user.client.ui.FocusWidget.onBrowserEvent(FocusWidget.java:102) at com.google.gwt.user.client.DOM.dispatchEventImpl(DOM.java:1308) at com.google.gwt.user.client.DOM.dispatchEventAndCatch(DOM.java:1287) at com.google.gwt.user.client.DOM.dispatchEvent(DOM.java:1255) at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103) at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:126) at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:155) at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294) at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194) at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966) at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720) at com.google.gwt.dev.GWTShell.run(GWTShell.java:593) at com.google.gwt.dev.GWTShell.main(GWTShell.java:357) Here iam not able to get value in swfWidget.root().getObject("check"); please help me in this issue --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: A possible critical bug for gwt-fabridge.
gwt-fabridge is a utility for gwt to access adobe swf file. See the following page http://code.google.com/p/gwt-fabridge/ On Feb 4, 5:59 am, Charlie Collins wrote: > I don't know whatgwt-fabridgeis, but maybe that project has it's own > support list you can use for issues such as this? Not sure you will > get much response here. > > On Feb 3, 4:00 pm, "Jihong Liu" wrote: > > > > > Hi. I have a problem forgwt-fabridge. I think it may be a critical > > issue forgwt-fabridge. > > > If a swf widget is added into a panel, and then add the panel into a > > container. And then remove the panel from the container, and then add > > the panel back into the container. Then the Null pointer error will > > occur at onInitialization()caused by the swf widget. I did a test using > > the FABridgeDemo. In the FABridgeDemo, I added a button for removing the > > swf widget. > > > When start the program, first click the "Add new SWF", and everything is > > ok. Then click the "Remove SWF", then the swf is removed. Then click the > > "Add new SWF" again, then an error will happen. > > > I have tried many ways, the only way to make it work is to create the > > swf widge again and using a different name if the widget has been > > removed. For example: > > > java.util.Date date = new java.util.Date(); > > > swfWidget = new > > SWFABridgeWidget("app.swf",400,400,"example"+date.getTime()); > > > But it is not good at all. And the behavior is not the same as other > > regular gwt widgets. For other widgets, after they are put in a panel. > > Then you can add/drop this panel into/from a container many times > > without re-create the inside widgets. > > > I am really frustrated about this problem. Based on user's selection we > > will add different panels into a container for display. It is really > > painful if we have to create the swf widgets again if the panel has been > > dropped from the container once. > > > I don't know whether the following code in > > pl.rmalinowski.gwt2swf.client.ui.SWFWidge causes problem or not. > > > protected void onUnload() { > > > // GWT.log("onUnload", null); > > > getElement().removeChild(DOM.getFirstChild(getElement())); > > > isSWFInjected = false; > > > super.onUnload(); > > > } > > > The statement: getElement().removeChild(DOM.getFirstChild(getElement())) > > removes the child from the widget. Thus after a swfwidget is removed > > from a panel, and then add the swf back, no child there. > > > Following is the code in com.google.gwt.user.client.ui.ComplexPanel > > > @Override > > > public boolean remove(Widget w) { > > > // Validate. > > > if (w.getParent() != this) { > > > return false; > > > } > > > // Orphan. > > > orphan(w); > > > // Physical detach. > > > Element elem = w.getElement(); > > > DOM.removeChild(DOM.getParent(elem), elem); > > > // Logical detach. > > > getChildren().remove(w); > > > return true; > > > } > > > It sounds to me that the different between two programs is that in > > ComplexPanel, it removes the widget's element only, but in SWFWidge, it > > removes the child of the widget's element. > > > Thank you very much! > > > Jihong Liu > > > Following is the source code which causes problem > > > package com.satmetrix.swfTest.client; > > > import org.argunet.gwt.fabridge.client.SWFABridgeWidget; > > > import org.argunet.gwt.fabridge.client.bridge.BridgeObject; > > > import org.argunet.gwt.fabridge.client.bridge.BridgeParameter; > > > import org.argunet.gwt.fabridge.client.bridge.BridgeParameterObject; > > > import org.argunet.gwt.fabridge.client.events.IInitializationListener; > > > import org.argunet.gwt.fabridge.client.events.ISWFListener; > > > import org.argunet.gwt.fabridge.client.utils.JSNIUtils; > > > import com.google.gwt.core.client.EntryPoint; > > > import com.google.gwt.core.client.JavaScriptObject; > > > import com.google.gwt.user.client.Window; > > > import com.google.gwt.user.client.ui.Button; > > > import com.google.gwt.user.client.ui.ClickListener; > > > import com.google.gwt.user.client.ui.Label; > > > import com.google.gwt.user.client.ui.RootPanel; > > > import com.google.gwt.user.client.ui.Widget; > > > public class FABridgeDemo implements EntryPoint, IInitializationListener > > { > > > private final Button addNewSwf = new Button("Add new SWF"); > > > private final Button removeSwf = new Button("Remove SWF"); > > > private final Button setCheckBox = new Button("Set Checkbox > > property"); > > > private final Label sliderLabel = new Label("Slider Label"); > > > private SWFABridgeWidget swfWidget=null; > > > private final Button createDataGrid = new Button("Create Data > > Grid"); > > > /** > > > * This is the entry point method. > > > */ > > > public void onModuleLoad() { > > > RootPanel.get().add(addNewSwf); > > > RootPanel.get().add(removeSwf); > > > RootPanel.get().add(setChe
Re: A possible critical bug for gwt-fabridge.
I don't know what gwt-fabridge is, but maybe that project has it's own support list you can use for issues such as this? Not sure you will get much response here. On Feb 3, 4:00 pm, "Jihong Liu" wrote: > Hi. I have a problem for gwt-fabridge. I think it may be a critical > issue for gwt-fabridge. > > If a swf widget is added into a panel, and then add the panel into a > container. And then remove the panel from the container, and then add > the panel back into the container. Then the Null pointer error will > occur at onInitialization()caused by the swf widget. I did a test using > the FABridgeDemo. In the FABridgeDemo, I added a button for removing the > swf widget. > > When start the program, first click the "Add new SWF", and everything is > ok. Then click the "Remove SWF", then the swf is removed. Then click the > "Add new SWF" again, then an error will happen. > > I have tried many ways, the only way to make it work is to create the > swf widge again and using a different name if the widget has been > removed. For example: > > java.util.Date date = new java.util.Date(); > > swfWidget = new > SWFABridgeWidget("app.swf",400,400,"example"+date.getTime()); > > But it is not good at all. And the behavior is not the same as other > regular gwt widgets. For other widgets, after they are put in a panel. > Then you can add/drop this panel into/from a container many times > without re-create the inside widgets. > > I am really frustrated about this problem. Based on user's selection we > will add different panels into a container for display. It is really > painful if we have to create the swf widgets again if the panel has been > dropped from the container once. > > I don't know whether the following code in > pl.rmalinowski.gwt2swf.client.ui.SWFWidge causes problem or not. > > protected void onUnload() { > > // GWT.log("onUnload", null); > > getElement().removeChild(DOM.getFirstChild(getElement())); > > isSWFInjected = false; > > super.onUnload(); > > } > > The statement: getElement().removeChild(DOM.getFirstChild(getElement())) > removes the child from the widget. Thus after a swfwidget is removed > from a panel, and then add the swf back, no child there. > > Following is the code in com.google.gwt.user.client.ui.ComplexPanel > > @Override > > public boolean remove(Widget w) { > > // Validate. > > if (w.getParent() != this) { > > return false; > > } > > // Orphan. > > orphan(w); > > // Physical detach. > > Element elem = w.getElement(); > > DOM.removeChild(DOM.getParent(elem), elem); > > // Logical detach. > > getChildren().remove(w); > > return true; > > } > > It sounds to me that the different between two programs is that in > ComplexPanel, it removes the widget's element only, but in SWFWidge, it > removes the child of the widget's element. > > Thank you very much! > > Jihong Liu > > Following is the source code which causes problem > > package com.satmetrix.swfTest.client; > > import org.argunet.gwt.fabridge.client.SWFABridgeWidget; > > import org.argunet.gwt.fabridge.client.bridge.BridgeObject; > > import org.argunet.gwt.fabridge.client.bridge.BridgeParameter; > > import org.argunet.gwt.fabridge.client.bridge.BridgeParameterObject; > > import org.argunet.gwt.fabridge.client.events.IInitializationListener; > > import org.argunet.gwt.fabridge.client.events.ISWFListener; > > import org.argunet.gwt.fabridge.client.utils.JSNIUtils; > > import com.google.gwt.core.client.EntryPoint; > > import com.google.gwt.core.client.JavaScriptObject; > > import com.google.gwt.user.client.Window; > > import com.google.gwt.user.client.ui.Button; > > import com.google.gwt.user.client.ui.ClickListener; > > import com.google.gwt.user.client.ui.Label; > > import com.google.gwt.user.client.ui.RootPanel; > > import com.google.gwt.user.client.ui.Widget; > > public class FABridgeDemo implements EntryPoint, IInitializationListener > { > > private final Button addNewSwf = new Button("Add new SWF"); > > private final Button removeSwf = new Button("Remove SWF"); > > private final Button setCheckBox = new Button("Set Checkbox > property"); > > private final Label sliderLabel = new Label("Slider Label"); > > private SWFABridgeWidget swfWidget=null; > > private final Button createDataGrid = new Button("Create Data > Grid"); > > /** > > * This is the entry point method. > > */ > > public void onModuleLoad() { > > RootPanel.get().add(addNewSwf); > > RootPanel.get().add(removeSwf); > > RootPanel.get().add(setCheckBox); > > RootPanel.get().add(sliderLabel); > > RootPanel.get().add(createDataGrid); > > // adds new swfWidget to rootPanel > > addNewSwf.addClickListener(new ClickListener() { > > public void onClick(Widget arg0) { > > // set bridge name for FABridge > >