Subject RE: [IBO] New TEST sub-release to all areas
Author Claudio Valderrama C.
Geoff, I have not reached this part because I crashed before.
;-)

In D3, the methods
TCustomLabel.AdjustBounds;
and
TCustomLabel.DoDrawText(var Rect: TRect; Flags: Word);
are private!

But the unit IBC_CustomLabel says in the declaration of TIB_CustomLabel:

{$IFDEF IBO_VCL40_OR_GREATER}
procedure DoDrawText(var Rect: TRect; Flags: longint); override;
{$ELSE}
procedure DoDrawText(var Rect: TRect; Flags: Word); override;
{$ENDIF}

Of course, the OVERRIDE in the $ELSE$ part cannot be applied since the
original method is private and is not declared virtual. Same for this part
in SetCharCase:

if AutoSize then
AdjustBounds;

Also, the enumeration used in
Flags := DrawTextBiDiModeFlags(Flags);
is not recognized. BIDIMode appears in other places of IBO but about this
enumeration, it's the first time I see it.

I probably can come with a lot of nasty and hacks, but I hope to get
recommendations first. At least the flags can be defined in an IFDEF for D3
(and BCB4?).

I was under the shower before lunch and I'm hosed again a few hours later!
;-)

C.

> -----Original Message-----
> From: Geoff Worboys [mailto:geoff@...]
> Sent: Domingo 21 de Enero de 2001 9:06
> To: IBObjects@egroups.com
> Subject: Re: [IBO] New TEST sub-release to all areas
>
>
> Whoops!
>
> I did discover a problem that you will have in pre Delphi/C++Builder
> v5. In IBC_Label.pas you will need to add the lines marked below
> before being able to compile the update.
>
> procedure TIB_AutoLabel.SetModel(const M:TControl);
> var
> TmpLbl: TCustomLabel;
> begin
> if (M<>FModel) then begin
> TmpLbl := GetModelLabel;
> if TmpLbl <> nil then begin
> if TmpLbl is TIB_Label then
> TIB_Label(TmpLbl).RemoveModelRef( Self )
> {$IFDEF IBO_VCL50_OR_GREATER} //<-- Add
> else if Assigned(theLabel) then
> FModel.RemoveFreeNotification( theLabel );
> {$ELSE}; //<-- Add
> {$ENDIF} //<-- Add
> end;
> FModel:=M;
>
>
> RemoveFreeNotification does not exist before v5. The online help in
> v5 says that it probably not necessary, but I prefer to leave the call
> in there for v5 for the sake of completeness.
>
> I meant to check under BCB4 before the changes were released, but
> forgot. Sorry for any inconvenience.
>
>
> Geoff Worboys
> Telesis Computing
>
>
>
>
>