Re: Help to implement OperationListener interface.
- From: mike <mikaelpetterson@xxxxxxxxxxx>
- Date: Tue, 30 Oct 2007 11:18:57 -0700
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
.
- Follow-Ups:
- Re: Help to implement OperationListener interface.
- From: Manish Pandit
- Re: Help to implement OperationListener interface.
- References:
- Help to implement OperationListener interface.
- From: mike
- Re: Help to implement OperationListener interface.
- From: Manish Pandit
- Help to implement OperationListener interface.
- Prev by Date: Re: [OT] Re: Why do so few women program a computer???
- Next by Date: Re: REAL SSCCE of my graphical interface with memory leaks
- Previous by thread: Re: Help to implement OperationListener interface.
- Next by thread: Re: Help to implement OperationListener interface.
- Index(es):
Relevant Pages
|
|