Solved

DataModule and Exception 'Cannot Focalize invisible Windows'

Posted on 1997-06-23
7
243 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
  • 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now