Delphi 3.0 Bug List
Posted: (EET/GMT+2)
Delphi 3.0 Bug List
Here are some bugs I've found while using Delphi 3.0. I have submitted these bugs to the Delphi 3.0 Bug List maintained by Reinier Sterkenburg. You can find these bugs from there, and possibly elsewhere.Currently 4 bugs are documented.
[ VCL | RTL | IDE | Compiler ]
On page 22-8 of the Delphi 3 Developer's Guide, it is said: "An empty
handler should produce the same result as no handler at all." However, this
is not the case with TField's OnGetText event. Instead, if you create
an OnGetText handler, you must make sure it returns something.
The following code from the VCL source shows the problem:
Here, according to the design principles, the code should call GetText
method anyway, regardless whether an OnGetText event hanlder exists.
This applies to the method "TField.GetEditText" also.
Solution:
Make sure field's OnGetText event handler always returns valid
information.
Note:
The probably reason OnGetText handling mechanism has been defined as above
is performance. However, this can be a difficult "bug" to track if you're
customed to the fact that most event handlers can be empty.
Problem example:
The selection is simply searched, and everything replaceable is replaced
with new text. If you now choose Search Again for example in another file,
Delphi forgets the Scope option you just specified. Along with the Prompt
On Replace option unchecked and Replace All button clicked, the results can
be dangerous, as the scope suddenly is global, not selected text.
Solution:
Always invoke the Replace command from the Replace Text dialog box.
Solution:
Only select one unit at a time.
Code example:
Above, the compiler doesn't notice the additional open-close
parenthesis combination after the procedure name. Such parenthesis
aren't allowed in the Pascal language syntax if the procedure (or
function) doesn't have any parameters.
Note that this doesn't apply to "normal" subroutines. If "MyProc"
wouldn't have been part of a class, the compiler would have shown a
proper error message.
Note:
I haven't tested this with the old style "objects", ie. "Type
TMyObject = object...".
Visual Component Library (VCL)
function TField.GetDisplayText: string;
begin
Result := '';
if Assigned(FOnGetText) then
FOnGetText(Self, Result, True) else
GetText(Result, True);
end;
Runtime Library (RTL)
Integrated Development Environment (IDE)
Compiler
Type
TMyObject = Class
Procedure MyProc;
End;
Procedure TMyObject.MyProc();
Begin
...
End;