Re: Help to implement OperationListener interface.



On Oct 30, 10:54 am, mike <mikaelpetter...@xxxxxxxxxxx> wrote:
Hi,

I have the following interface OperationListener interface ( it's for
an open source project I helping out with). Well the idea behind the
interface is to monitor operations taking place simlair to the
eclipse IProgressMonitor.

Then I have an operation like:

myApp.operationDel( file, operationListener);

I don't know how to implement the interface.

Any ideas ?


If I understood the problem statement correctly, I do not think you
have to implement the interface - you will need to call the interface
methods as you progress through the operationDel. The *caller* will
give you an implementation of this interface, which you will use as a
callback to notify the caller of various events, and the caller (I
suppose) will use this information to render a progressbar, or report
status via messages, etc.

For example, you will invoke operationListener.startedOperation(100);
where 100 is the % remaining. At the end, you will invoke
operationListener.finishedOperation().

Hope this helps!

-cheers,
Manish

.



Relevant Pages

  • Re: Dual interface
    ... and exposes IDispatch (it must expose IUnknown ... I think the law should be every interface of the COM component implements, ... If a component implements a customized interface, ... then we could invoke the ...
    (microsoft.public.vc.language)
  • Re: UML Question (Object <-> ObjectFinder?)
    ... >>>Then why not talk directly to Proxy? ... >>>interoperability interface driven by command strings. ... creates the right command string and invokes Proxy.doIt. ... >>>interface method could form the command string and invoke Proxy.doIt ...
    (comp.object)
  • Re: aspnet_wp.exe and COM+
    ... For releasing the interface i am not sure what you mean by, ... Such components do run "in-process", that means they run in the security context of the caller, so here the caller is allowed to call LogonUser(which I suppose you do in your Impersonate method) and the CreateEventEmailFolder Method doesn't need distributed transaction services either. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [UPDATE PATCH] push rounding up of relative request to schedule_timeout()
    ... >>sleeps probably need to use a different interface. ... > Adding 1 is easy enough for the caller and even easier to explain in the ... > instructions (i.e. this call sleeps for X jiffies edges). ... Lots of drivers basically do something like ...
    (Linux-Kernel)
  • Invalid callback object instance
    ... For asynchronous operations I use ... a callback interface to notify the application of completions. ... I receive as the first parameter (caller) is not valid. ...
    (microsoft.public.dotnet.framework.interop)