Solved

DataModule and Exception 'Cannot Focalize invisible Windows'

Posted on 1997-06-23
7
251 Views
Last Modified: 2010-04-04
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
Comment
Question by:F268
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 2

Expert Comment

by:icampbe1
ID: 1337673
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
 

Author Comment

by:F268
ID: 1337674
Edited text of question
0
 

Author Comment

by:F268
ID: 1337675
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!

 
LVL 2

Expert Comment

by:icampbe1
ID: 1337676
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
 
LVL 1

Accepted Solution

by:
Gabor earned 50 total points
ID: 1337677
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
 

Author Comment

by:F268
ID: 1337678
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
 
LVL 1

Expert Comment

by:Gabor
ID: 1337679
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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month3 days, 14 hours left to enroll

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question