Jarrod,
  Try toggling display: none/block on the <object> element after the
param values are setup and see what happens. On the Flash plugin, this
causes reinitialization in IE.

-Ray

On Wed, Dec 16, 2009 at 2:33 PM, Ray Cromwell <[email protected]> wrote:
> I'm not sure about this particular issue, but this is a well known
> problem when injecting Flash into IE DOM. IE will not only
> restart/reinitialize ActiveX plugins when you move nodes around the
> DOM, it will also do it when you set display: none|block, which causes
> havoc if you put a widget into something like a stack panel or tab
> panel. The only solution I've found is to have the plugin serialize
> state to GWT, and then restore it whenever it boots up.
>
> See the attach() function here:
> http://code.google.com/p/gwt-chronoscope/source/browse/trunk/chronoscope/src/main/java/org/timepedia/chronoscope/client/browser/flashcanvas/FlashCanvas.java
>
> When Flash starts up, it calls into my GWT app. If it is the first
> time, then the app continues initialization. If it is the second time,
> it means IE has restarted the SWF, so resyncLayers() is called, which
> causes my app to push all of the state back to the plugin.
>
> I tried ways of getting around this, like creating a proxy widget is
> attached and controls the Flash widget which lives as an absolutely
> positioned element of <body>, and then trying to look for the proxy
> being hidden and hiding the Flash layer by moving it offscreen, but it
> is laggy and you still get into situations where IE can spontaneously
> restart your SWF sometimes.
>
> -Ray
>
> On Wed, Dec 16, 2009 at 4:27 AM, djd <[email protected]> wrote:
>> Jarrod, you could try to code 2 versions of that class, say
>> UploaderWidget and UploaderWidgetIE, and dinamically switch from one
>> to another with (almost) the same rules
>>
>> On Dec 15, 8:13 pm, jarrod <[email protected]> wrote:
>>> Actually, I was just struggling with this a bit... I have my two
>>> ui.xml templates setup, but I can't seem to get GWT.create() to select
>>> the right one. Here's what I tried:
>>>
>>> @UiTemplate("JavaApplet.ui.xml")
>>> interface JavaApplet extends UiBinder<Element, UploaderWidget> {
>>>
>>> }
>>>
>>> @UiTemplate("JavaAppletIE.ui.xml")
>>> interface JavaAppletIE extends JavaApplet {
>>>
>>> }
>>>
>>> JavaApplet binder = GWT.create(JavaApplet.class);
>>>
>>> The following rules were defined in my module:
>>>         <replace-with
>>> class="com.playonsports.web.uploader.client.JavaAppletIE">
>>>                 <when-type-is
>>> class="com.playonsports.web.uploader.client.JavaApplet" />
>>>                 <any>
>>>                         <when-property-is name="user.agent" value="ie6" />
>>>                         <when-property-is name="user.agent" value="ie8" />
>>>                 </any>
>>>         </replace-with>
>>>
>>> But unfortunately, I just get compiler errors:
>>> 12/15/09 12:45:14 PM EST: [INFO] Compiling module
>>> com.playonsports.web.uploader.Uploader
>>> 12/15/09 12:45:21 PM EST: [INFO]    [ERROR] Errors in 'file:/C:/Users/
>>> jcarlson/Projects/com.playonsports.web.uploader/src/main/java/com/
>>> playonsports/web/uploader/client/UploaderWidget.java'
>>> 12/15/09 12:45:21 PM EST: [INFO]       [ERROR] Line 16:  Rebind result
>>> 'com.playonsports.web.uploader.client.JavaAppletIE' must be a class
>>> 12/15/09 12:45:21 PM EST: [INFO]    [ERROR] Cannot proceed due to
>>> previous errors
>>>
>>> I guess that makes sense, but how does one get around this?
>>>
>>> On Dec 15, 11:44 am, John Tamplin <[email protected]> wrote:
>>>
>>>
>>>
>>> > On Tue, Dec 15, 2009 at 11:29 AM, jarrod <[email protected]> wrote:
>>> > > Combined with the ability to use different ui.xml templates documented
>>> > > here:
>>>
>>> > >http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Ap...
>>> > > I should be able to declare one ui.xml for IE and another for
>>> > > everything else. I'll try that next and that would really simplify
>>> > > things.
>>>
>>> > Speaking of that example,  shouldn't the GWT.create calls refer to
>>> > RedBinder/BlueBinder?
>>>
>>> > --
>>> > John A. Tamplin
>>> > Software Engineer (GWT), Google
>>
>> --
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to