Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

DataModule and Exception 'Cannot Focalize invisible Windows'

In Delphi 2 i use the DataModule.
 In my tables i have fields which require value so i don't
 need to write a control and exception code to test if
 a value is present. it's "automatic" !!!
But when a valu miss i have this exception message 'cannot focalize invisible windows'
(it is a translation the message is in French Langage)

Hello... I Try your solutions but the exception event seemed raised BEFORE the OnValidate Event
(I Try to put a break at the top of this procedure with the key F5 but the
exception event raised before this.
0
F268
Asked:
F268
  • 3
  • 2
  • 2
1 Solution
 
icampbe1Commented:
The existing event handler is not doing what you want.  You do not need to write a control to  solve this.  Just supply an OnValidate proc for the field.  It doesn't have to do much... Put up a dialog box maybe, set a default value, or whatever.   OR!!  Trap the execption  (whatever one gets raised)  TRY ... EXCEPT ON Exception DO BEGIN Showmessage('Field missing'); {do whatever} END; END;

0
 
F268Author Commented:
Edited text of question
0
 
F268Author Commented:
Hello iCampbe1. I try your solutions and i put a break
(with the key F5) but the exception event seemed arrived BEFORE
the OnValidate Procedure.....


0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
icampbe1Commented:
You must first of all determine exactly where the exception is being raised.  Use TRY... EXCEPT and increase the scope of this TRY EXCEPT until you have captured the exception.  Once you have determined this, then you know what problem you are fixing.
0
 
GaborCommented:
I think the editing form is closed before calling the table post method.
You have to call this method directly from your editing form before it is closed, before the form's controls become invisible.

If it doesn't work write down the situation more detailed, maybe I can help you.

0
 
F268Author Commented:
Sorry but with the DataModule i don't closed the form. it's the special form of Delphi 2 where you can put all the VCL which are non visual object for user (table, datasource,...) and this special 'form' don't have close evenement.

0
 
GaborCommented:
It would be good to describe the flow of your task, because I tought that there is a Form with controls to edit the fields of the table.

So?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now