Re: Help to implement OperationListener interface.



On 30 Okt, 19:04, Manish Pandit <pandit.man...@xxxxxxxxx> wrote:
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().

Ok!

I am calling the interface as my task, operationDel, makes progress or
isCanceled.
Shall the class where I have my call:

myApp.operationDel( file, operationListener);

implement the interface. Seems like I cannot figure out how the
callback is working!
Or am I missing something here?

cheers,

mike




Hope this helps!

-cheers,
Manish


.



Relevant Pages

  • Re: Help to implement OperationListener interface.
    ... I am calling the interface as my task, operationDel, makes progress or ... implement the interface. ... the callback mechanism, later you can tie it to more complex solution, ...
    (comp.lang.java.programmer)
  • 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)
  • How do you do asynchronous processing in C#
    ... I'm trying to implement asynchronous call to COM interface below and having trouble understanding what C# code will allow me to update progress bar while call is running. ... I have an object called MyDownloader which has a method of BeginDownload below, I need to periodically update main program about progress and when call is completed to return back to processing. ... An IDownloadProgressChangedCallback interface that is called periodically for download progress changes before completion. ...
    (microsoft.public.dotnet.languages.csharp)
  • 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)