 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
daniel Guest
|
Posted: Thu Dec 11, 2003 10:47 am Post subject: PanelsMouseDown - incompatible types |
|
|
allo,
sample code :
type TScrollBoxEx = class(TScrollBox)
private
procedure PanelsMouseDown(Sender : TObject; Button : TMouseButton; Shift:
TShiftState; x,y: Integer );
end;
in the constructor,
aPanel[indx].onMouseDown := PanelsMouseDown;
the compiler gave this error :-
incompatible types: 'Controls.TMouseButton' and 'scrollboxex.TMouseButton'
do advise for what can i do to overcome that.
thanks
daniel
|
|
| Back to top |
|
 |
J French Guest
|
Posted: Thu Dec 11, 2003 12:15 pm Post subject: Re: PanelsMouseDown - incompatible types |
|
|
On Thu, 11 Dec 2003 18:47:23 +0800, "daniel" <mrdaniel (AT) singnet (DOT) com.sg>
wrote:
| Quote: | allo,
sample code :
type TScrollBoxEx = class(TScrollBox)
private
procedure PanelsMouseDown(Sender : TObject; Button : TMouseButton; Shift:
TShiftState; x,y: Integer );
end;
in the constructor,
aPanel[indx].onMouseDown := PanelsMouseDown;
the compiler gave this error :-
incompatible types: 'Controls.TMouseButton' and 'scrollboxex.TMouseButton'
do advise for what can i do to overcome that.
|
I suspect that there is a bit more to the story than the code you
posted.
Are you sure that you are not creating a new TMouseButton type in
ScrollBoxEx ?
- Delphi seems to think that you are doing that
|
|
| Back to top |
|
 |
daniel Guest
|
Posted: Thu Dec 11, 2003 12:34 pm Post subject: Re: PanelsMouseDown - incompatible types |
|
|
allo J,
you wrote,
| Quote: | Are you sure that you are not creating a new TMouseButton type in
ScrollBoxEx ?
|
yes and the procedure was the one as i posted and in fact the implementation
for that precedure has not been coded yet as :-
procedure TScrollBoxEX.PanelsMouseDown(Sender : TObject; Button :
TMouseButton; Shift : TShiftState; x,y : Integer );
begin
{ no code yet}
end;
your help will be most appreciated else i am stuck.
nb: any thing to do with compiler directives.
ciao
daniel
"J French" <erewhon (AT) nowhere (DOT) com> wrote
| Quote: | On Thu, 11 Dec 2003 18:47:23 +0800, "daniel"
wrote:
allo,
sample code :
type TScrollBoxEx = class(TScrollBox)
private
procedure PanelsMouseDown(Sender : TObject; Button : TMouseButton; Shift:
TShiftState; x,y: Integer );
end;
in the constructor,
aPanel[indx].onMouseDown := PanelsMouseDown;
the compiler gave this error :-
incompatible types: 'Controls.TMouseButton' and
'scrollboxex.TMouseButton'
do advise for what can i do to overcome that.
I suspect that there is a bit more to the story than the code you
posted.
Are you sure that you are not creating a new TMouseButton type in
ScrollBoxEx ?
- Delphi seems to think that you are doing that
|
|
|
| Back to top |
|
 |
J French Guest
|
Posted: Thu Dec 11, 2003 1:28 pm Post subject: Re: PanelsMouseDown - incompatible types |
|
|
On Thu, 11 Dec 2003 20:34:25 +0800, "daniel" <mrdaniel (AT) singnet (DOT) com.sg>
wrote:
| Quote: | allo J,
you wrote,
Are you sure that you are not creating a new TMouseButton type in
ScrollBoxEx ?
yes and the procedure was the one as i posted and in fact the implementation
for that precedure has not been coded yet as :-
procedure TScrollBoxEX.PanelsMouseDown(Sender : TObject; Button :
TMouseButton; Shift : TShiftState; x,y : Integer );
begin
{ no code yet}
end;
your help will be most appreciated else i am stuck.
nb: any thing to do with compiler directives.
|
The first thing I would try is to alter TMouseButton
to: Controls.TMouseButton
If that makes things behave then I would undo the changes, Right Click
on the various TMouseButtons and use Find Declaration
The problem is almost certainly something fishy about your Uses list
- my guess would be some flashy 3rd party stuff has redefined
TMouseButton to cater for the latest innovation
|
|
| Back to top |
|
 |
daniel Guest
|
Posted: Thu Dec 11, 2003 2:26 pm Post subject: Re: PanelsMouseDown - incompatible types |
|
|
allo J.
i'd added the Controls.TMouseButton and a recompile this time has no error.
your thought of the third party component could be true but meanwhile take a
look at the following where there is a similar error of type incompatiblity
:-
code sample :-
constructor TScrollBoxEx.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
BorderStyle := bsNone;
......
end;
now the compiler gave an error like:
Incompatible types:'forms.TBorderStyle' and 'scrollboxex.TBorder'
what should i do for that.
ciao
daniel
"J French" <erewhon (AT) nowhere (DOT) com> wrote
| Quote: | On Thu, 11 Dec 2003 20:34:25 +0800, "daniel"
wrote:
allo J,
you wrote,
Are you sure that you are not creating a new TMouseButton type in
ScrollBoxEx ?
yes and the procedure was the one as i posted and in fact the
implementation
for that precedure has not been coded yet as :-
procedure TScrollBoxEX.PanelsMouseDown(Sender : TObject; Button :
TMouseButton; Shift : TShiftState; x,y : Integer );
begin
{ no code yet}
end;
your help will be most appreciated else i am stuck.
nb: any thing to do with compiler directives.
The first thing I would try is to alter TMouseButton
to: Controls.TMouseButton
If that makes things behave then I would undo the changes, Right Click
on the various TMouseButtons and use Find Declaration
The problem is almost certainly something fishy about your Uses list
- my guess would be some flashy 3rd party stuff has redefined
TMouseButton to cater for the latest innovation
|
|
|
| Back to top |
|
 |
J French Guest
|
Posted: Thu Dec 11, 2003 5:55 pm Post subject: Re: PanelsMouseDown - incompatible types |
|
|
GET RID OF THE 3RD PARTY RUBBISH
- and, yes, I do mean to shout
On Thu, 11 Dec 2003 22:26:08 +0800, "daniel" <websmith (AT) singnet (DOT) com.sg>
wrote:
| Quote: | allo J.
i'd added the Controls.TMouseButton and a recompile this time has no error.
your thought of the third party component could be true but meanwhile take a
look at the following where there is a similar error of type incompatiblity
:-
code sample :-
constructor TScrollBoxEx.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
BorderStyle := bsNone;
.....
end;
now the compiler gave an error like:
Incompatible types:'forms.TBorderStyle' and 'scrollboxex.TBorder'
what should i do for that.
ciao
daniel
"J French" <erewhon (AT) nowhere (DOT) com> wrote in message
news:3fd86fd9.13067914 (AT) news (DOT) btclick.com...
On Thu, 11 Dec 2003 20:34:25 +0800, "daniel"
wrote:
allo J,
you wrote,
Are you sure that you are not creating a new TMouseButton type in
ScrollBoxEx ?
yes and the procedure was the one as i posted and in fact the
implementation
for that precedure has not been coded yet as :-
procedure TScrollBoxEX.PanelsMouseDown(Sender : TObject; Button :
TMouseButton; Shift : TShiftState; x,y : Integer );
begin
{ no code yet}
end;
your help will be most appreciated else i am stuck.
nb: any thing to do with compiler directives.
The first thing I would try is to alter TMouseButton
to: Controls.TMouseButton
If that makes things behave then I would undo the changes, Right Click
on the various TMouseButtons and use Find Declaration
The problem is almost certainly something fishy about your Uses list
- my guess would be some flashy 3rd party stuff has redefined
TMouseButton to cater for the latest innovation
|
|
|
| Back to top |
|
 |
daniel Guest
|
Posted: Sat Dec 13, 2003 5:41 am Post subject: Re: PanelsMouseDown - incompatible types |
|
|
allo once again,
though the recompile and runtime has got no error, somehow the procedure
never gets the call.
could it be due to the Controls.TMouseButton that differs from the original
intent.
also one very importane point is that i recompile the same project in a new
and freshly install D6 (that has no third party tools)
the incopatibilty is there.
thus how that incompatibility comes about.
thanks
daniel
]
"J French" <erewhon (AT) nowhere (DOT) com> wrote
| Quote: | GET RID OF THE 3RD PARTY RUBBISH
- and, yes, I do mean to shout
On Thu, 11 Dec 2003 22:26:08 +0800, "daniel" <websmith (AT) singnet (DOT) com.sg
wrote:
allo J.
i'd added the Controls.TMouseButton and a recompile this time has no
error.
your thought of the third party component could be true but meanwhile
take a
look at the following where there is a similar error of type
incompatiblity
:-
code sample :-
constructor TScrollBoxEx.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
BorderStyle := bsNone;
.....
end;
now the compiler gave an error like:
Incompatible types:'forms.TBorderStyle' and 'scrollboxex.TBorder'
what should i do for that.
ciao
daniel
"J French"
news:3fd86fd9.13067914 (AT) news (DOT) btclick.com...
On Thu, 11 Dec 2003 20:34:25 +0800, "daniel"
wrote:
allo J,
you wrote,
Are you sure that you are not creating a new TMouseButton type in
ScrollBoxEx ?
yes and the procedure was the one as i posted and in fact the
implementation
for that precedure has not been coded yet as :-
procedure TScrollBoxEX.PanelsMouseDown(Sender : TObject; Button :
TMouseButton; Shift : TShiftState; x,y : Integer );
begin
{ no code yet}
end;
your help will be most appreciated else i am stuck.
nb: any thing to do with compiler directives.
The first thing I would try is to alter TMouseButton
to: Controls.TMouseButton
If that makes things behave then I would undo the changes, Right Click
on the various TMouseButtons and use Find Declaration
The problem is almost certainly something fishy about your Uses list
- my guess would be some flashy 3rd party stuff has redefined
TMouseButton to cater for the latest innovation
|
|
|
| Back to top |
|
 |
J French Guest
|
Posted: Sat Dec 13, 2003 10:06 am Post subject: Re: PanelsMouseDown - incompatible types |
|
|
On Sat, 13 Dec 2003 13:41:25 +0800, "daniel" <mrdaniel (AT) singnet (DOT) com.sg>
wrote:
| Quote: | allo once again,
though the recompile and runtime has got no error, somehow the procedure
never gets the call.
could it be due to the Controls.TMouseButton that differs from the original
intent.
also one very importane point is that i recompile the same project in a new
and freshly install D6 (that has no third party tools)
the incopatibilty is there.
thus how that incompatibility comes about.
|
My hunch is that you had a 3rd party Unit somewere in your App
And that it had redefined TMouseButton
It could even be the case that some smart Alec had provided a hacked
version of Controls.pas
The thing to do is to check one's Uses list very carefully
- and keep it trimmed to the minimum
Also to be very careful of 3rd party stuff
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|