Jump to content


Photo

Unable to install NxCollection6Run_d7 -- Undeclared identifier: 'Offset'


  • Please log in to reply
3 replies to this topic

#1 ouiji

ouiji
  • Members
  • 7 posts

Posted 29 January 2018 - 01:24 PM

When attempting to install the NxCollection6 runtime package (In delphi7) I receive the following error:

 

 

[Error] NxCollection6.pas(3831): Undeclared identifier: 'Offset'

[Fatal Error] NxBar6.pas(20): Could not compile used unit '..\..\Sources\Next Collection\NxCollection6.pas'

 

 

Which refers to:

 

function TNxTrackBar6.GetTrackRect: TRect;
begin
  Result.Left := MinusRect.Right + DotToPixel(4);
  Result.Right := PlusRect.Left - DotToPixel(4);
  Result.Top := 0;
  Result.Bottom := Result.Top + TrackHeight;
  Result.Offset(0, RectHeight(ContentRect) div 2 - RectHeight(Result) div 2);     <<----- This Line
end;
 
 
My sys\Types.pas has TRect defined as
 
 PRect = ^TRect;
  TRect = packed record
    case Integer of
      0: (Left, Top, Right, Bottom: Longint);
      1: (TopLeft, BottomRight: TPoint);
  end;
  {$NODEFINE TRect}
 
 
 
 
Any ideas?


#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 29 January 2018 - 07:59 PM

Hi,

My apologize, I accidentally used new Offset procedure.

Replace it with delphi 7 OffSetRect method. I will change it now.

Tell me if you need whole procedure.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 29 January 2018 - 08:02 PM

Here is correct procedure:

function TNxTrackBar6.GetTrackRect: TRect;
begin
  Result.Left := MinusRect.Right + DotToPixel(4);
  Result.Right := PlusRect.Left - DotToPixel(4);
  Result.Top := 0;
  Result.Bottom := Result.Top + TrackHeight;
  OffsetRect(Result, 0, RectHeight(ContentRect) div 2 - RectHeight(Result) div 2);
end;

boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#4 ouiji

ouiji
  • Members
  • 7 posts

Posted 31 January 2018 - 01:35 PM

Worked like a charm, many thanks for the quick reply. 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users