When I run compile in D2010 the project breaks at this line of code...
while (Offs>0) and rve.RVData.IsDelimiterW(Word(ws[Offs])) do begin
message line 1899
[DCC Error] MainFrame2.pas(1899): E2010 Incompatible types: 'Char' and 'Word'
Any help is appreciated.....
from the procedure shown below...
++++++++++++++++++++++++++++++++++++++++++
{=========================== Word Selection ===================================}
{ Selecting previous word in the ItemNo-th item of rve. Offs - caret position.
Moved - if the caret was already moved }
function SelectPrevWordInItem(rve: TCustomRichViewEdit; ItemNo, Offs: Integer;
Moved: Boolean): Boolean;
var ws: WideString;
WordEndOffs: Integer;
begin
Result := False;
if rve.GetItemStyle(ItemNo)<0 then
exit;
ws := rve.GetItemTextW(ItemNo);
dec(Offs);
// skipping delimiters
while (Offs>0) and rve.RVData.IsDelimiterW(Word(ws[Offs])) do begin
dec(Offs);
Moved := True;
end;
if Offs=0 then
exit;
// if the caret was not moved, skipping the current word and delimiters before it
if not Moved then begin
while (Offs>0) and not rve.RVData.IsDelimiterW(Word(ws[Offs])) do
dec(Offs);
if Offs=0 then
exit;
while (Offs>0) and rve.RVData.IsDelimiterW(Word(ws[Offs])) do
dec(Offs);
if Offs=0 then
exit;
end;
// we are at the end of word, finding its beginning
WordEndOffs := Offs;
while (Offs>0) and not rve.RVData.IsDelimiterW(Word(ws[Offs])) do
dec(Offs);
rve.SetSelectionBounds(ItemNo, Offs+1, ItemNo, WordEndOffs+1);
rve.Invalidate;
Result := True;
end;
Getting old RichView Delphi5 project to compile on D2010 ?
-
- Posts: 67
- Joined: Sat May 13, 2006 1:56 pm
- Location: Australia
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: