ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 OnFinishWork event handler for actions?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - Apr 11 2015 : 13:09:33
Hi! I need to enable a Save button AFTER the PROCESSING of a TImageEn has finished. So I put a TImageEnProc on the form and set its AttachedImageEn property to ImageEn1.

However, when I process the ImageEn1 with one of the preset ImageEnViewProc actions from the ImageEn library, the ImageEnProc1.OnFinishWork event is not triggered!

So how can I implement an event handler which is triggered after the ImageEn processing from a preset ImageEn action?
6   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Apr 21 2015 : 20:43:55
Sorry Peter, I missed the gist of that.

To determine the task type, check the class of the sender:

  if Sender is TImageEnIO then
    MainForm.Caption := 'IO Task has finished'
  else             
  if Sender is TImageEnProc then
    MainForm.Caption := 'Processing Task has finished'
  else                 
    MainForm.Caption := 'Unexpected result!';


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
zerob Posted - Apr 21 2015 : 09:10:38
@Peter: You could set a global variable with the state in it, so the OnFinishWork function knows if TImageEn just finished saving or processing.

@Xequte: I think he means, that his OnFinishWork function has no way to know why it was called... What work just finished.
xequte Posted - Apr 20 2015 : 23:40:29
Hi

I cannot find any problem with OnFinishWork. It is called correctly after processing of images.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
xequte Posted - Apr 13 2015 : 02:04:59
Hi

It should not matter whether it is saving or editing. The ImageEn actions use TImageEnView.Proc, and TImageEnView.Proc.OnFinishWork is assigned to TImageEnView.OnFinishWork.

I will investigate when I am back in the office next week.


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
PeterPanino Posted - Apr 12 2015 : 04:21:24
Please note: I need to enable something after the PROCESSING of an image has finished (i.e. after a PROC function), NOT when saving has finished. When I use TImageEn.OnFinishWork, then it would fire also after saving which I do not want.

And BTW: I do the PROCESSING in this case with the predefined ImageEn Actions, so I cannot use ActionList.OnExecute, because that event is fired BEFORE the action is executed.
xequte Posted - Apr 12 2015 : 01:56:48
Hi

I assume ImageEn1 is a TImageEnView, so you do not need to use a TImageEnProc, instead just call ImageEn1.Proc....

At any rate, saving does not use a TImageEnProc object (which is for editing and analayzing images) it uses a TImageEnIO object (loading and saving images). Which you can access via ImageEn1.IO...

And just ImageEn1.OnFinishWork to know when saving has completed.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com