Re: Sink events from window.external

From: Mark Guerrieri (mguerrieri_at_nospam_cmsgrp.com)
Date: 02/10/05

  • Next message: MR SCOTT MILLAR: "basic vbscript help needed"
    Date: Thu, 10 Feb 2005 11:17:58 -0500
    
    

    >
    > It's IObjectWithSite - my bad. You can happily implement it on a
    > non-visual component, whether in-proc or out-of-proc. Alternatively, you
    > can just wait until all references on you are released.
    >

    Sadly, I knew what you meant and retyped the wrong interface name anyway!
    As for waiting for all references to be released, that won't happen, as the
    Client App holds a reference to the object to keep it alive.

    >
    > In this case, whoever implements window.external could notify the
    > component (perhaps by calling a special method on a custom interface)
    > that the page got unloaded, so the component can release event sink
    > interfaces.
    >

    That could be done, as I implement window.external myself.

    Anyway, it just seems like a lot of work for something that I thought would
    be easy... I should have realized that nothing is ever easy...

    What I have done for a workaround in the meantime is a similar principal- I
    created an in-process server that fires all the same events and the User
    object. It has a method "Connect" that takes a User object as a parameter
    and sinks all of its events. All this new object does is re-fire any events
    that the User object sends. I can then create this server on a page with an
    <OBJECT> tag and sync its events using the standard "Object_Event" style,
    which in reality is the same as sinking the events of the User object
    itself. Very roundabout, but much easier than reimplementing the User
    object and Browser container...

    Mark


  • Next message: MR SCOTT MILLAR: "basic vbscript help needed"

    Relevant Pages

    • Re: Sink events from window.external
      ... I knew what you meant and retyped the wrong interface name anyway! ... As for waiting for all references to be released, that won't happen, as the ... created an in-process server that fires all the same events and the User ... It has a method "Connect" that takes a User object as a parameter ...
      (microsoft.public.inetsdk.programming.webbrowser_ctl)
    • Re: Sink events from window.external
      ... I knew what you meant and retyped the wrong interface name anyway! ... As for waiting for all references to be released, that won't happen, as the ... created an in-process server that fires all the same events and the User ... It has a method "Connect" that takes a User object as a parameter ...
      (microsoft.public.scripting.vbscript)
    • misc thing (my lang): vm handling of external objects
      ... it isn't really possible to pass vm references around outside the ... only the direct interface code will know anything about the vm. ... objects are untyped void pointers. ... another in the external codebase) will manage the export of vm references ...
      (comp.lang.misc)
    • Re: cyclic dependency
      ... but I see cyclical references between ... assemblies as a sign of bad design. ... public class ProjectA: System.Windows.Forms.Form ... > to implement the Separated Interface Pattern. ...
      (microsoft.public.dotnet.languages.csharp)
    • Failed to run sample from article Setting Large Data
      ... I wonder how to utilize IRowsetChange interface with Microsoft SQL Server ... const ULONG cBindings = 1; ... // Release any references and return. ...
      (microsoft.public.data.oledb)

    Loading