Subject | Re: [IBO] Fw: PACKAGE sample |
---|---|
Author | Enrico Cima |
Post date | 2001-08-05T20:51:40Z |
Dear Geoff,
the problem is that during the construction of the IB_GRID on the form or on
displayng the IB_UPDATEBAR I got the error.
I've tried some situation and i have the exception only when i use IB_GRID,
IB_NAVIGATIONBAR or IB_Update Bar.
for example, the error in IB_GRID is:
Project prova.exe raised exception class EAccessViolation with message
'Access violation at
address 4005C40C in module 'VCL50.BPL'. Read of address FFFFFFFF'. ........
And the debugger stops on the line marked '->' in the file IB_Grid.pas.
..
// Since the VCL makes the assumption that the InPlace editor exists in the
// focused cell if FEditorMode is true it does NOT send a DrawCell() call
for
// the focused cell. But, with IBO, the CanEditShow() method returns false
// in cases where the embedded lookup combo or check box are to be. Thus,
// I still need the DrawCell() call in order to draw these controls/glyphs
// properly. What this hack does is trick the VCL into thinking that there
is
// no InPlace editor so it will send a DrawCell() call for all cells that
have
// been invalidated.
oldFEditorMode := EditorMode;
oldBufRow := DataLink.BufferRecord;
try
THackCustomGrid( Self ).FEditorMode := false;
-> inherited Paint;
finally
..
If i let the program go on, I can read the data of the database, but the
first column
is not written correctly and then again it, moving cursor, the program raise
another
exception and then crash.
With other component I have not any problems.
Any suggestion?
Thank You,
Bye!
Enrico
the problem is that during the construction of the IB_GRID on the form or on
displayng the IB_UPDATEBAR I got the error.
I've tried some situation and i have the exception only when i use IB_GRID,
IB_NAVIGATIONBAR or IB_Update Bar.
for example, the error in IB_GRID is:
Project prova.exe raised exception class EAccessViolation with message
'Access violation at
address 4005C40C in module 'VCL50.BPL'. Read of address FFFFFFFF'. ........
And the debugger stops on the line marked '->' in the file IB_Grid.pas.
..
// Since the VCL makes the assumption that the InPlace editor exists in the
// focused cell if FEditorMode is true it does NOT send a DrawCell() call
for
// the focused cell. But, with IBO, the CanEditShow() method returns false
// in cases where the embedded lookup combo or check box are to be. Thus,
// I still need the DrawCell() call in order to draw these controls/glyphs
// properly. What this hack does is trick the VCL into thinking that there
is
// no InPlace editor so it will send a DrawCell() call for all cells that
have
// been invalidated.
oldFEditorMode := EditorMode;
oldBufRow := DataLink.BufferRecord;
try
THackCustomGrid( Self ).FEditorMode := false;
-> inherited Paint;
finally
..
If i let the program go on, I can read the data of the database, but the
first column
is not written correctly and then again it, moving cursor, the program raise
another
exception and then crash.
With other component I have not any problems.
Any suggestion?
Thank You,
Bye!
Enrico
----- Original Message -----
From: "Geoff Worboys" <geoff@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, August 03, 2001 1:15 PM
Subject: Re: [IBO] Fw: PACKAGE sample
> > There is somebody who can give me some datails on how operate?
> > Many thanks to all.
>
> It may help if you could describe what errors you get and when.
>
> One common problem with this sort of thing is when the components you
> assign come from different modules. You may (and probably should)
> override the Notification method of your component AND use
> FreeNotification calls to be sure your component is told when related
> connections are destroyed.
>
> You can read about Notification and FreeNotification in the VCL online
> help, but to briefly summarise...
>
> When components belong to the same owner (usually the form) and a
> component is deleted all other components on the same owner are
> notified. Components that setup relationships to other components
> (such that you are doing with connections) should override the
> Notification method in a manner similar to below. (I've been doing
> mostly Pascal for a few months so excuse the mix of pseudo code and
> bad syntax :-)
>
>
> void __fastcall TMyComp::Notification(TComponent* AComponent,
> TOperation Operation)
> {
> <call the base class Notification method>
> if( Operation = opRemove )
> <check if AComponent is one of the
> connections you are using, is so
> clear your reference>
> };
>
>
> If your component is likely to relate to connections on other modules
> you will want to ensure that it gets notification of their
> destruction. You do this by...
>
> void __fastcall TMyComp::AddConnection(TIB_Connection *C)
> {
> <do whatever>
> if( C && (C->Owner != Owner) )
> C->FreeNotification(this);
> };
>
>
> In Delphi5 and BCB5 and later you can also remove the FreeNotification
> as in...
>
> void __fastcall TMyComp::RemoveConnection(TIB_Connection *C)
> {
> <do whatever>
> if( C && (C->Owner != Owner) )
> C->RemoveFreeNotification(this);
> };
>
>
> Maybe this is your problem, maybe not. But it could be a start.
>
>
> Geoff Worboys
> Telesis Computing
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>