| Bug # | Delphi versions | Description |
| 112 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
Problem accessing array properties of strings |
| 114 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
Compiler now finds {$R ... } directives after END. |
| 117 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
It is possible to call a function or procedure within a unit before the initialization section for that unit has been executed |
| 444 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
D4 generates wrong code for all TOleControl descendants (TXXXXControl = class(TOleControl): all function methods with parameters are generated incorrectly. |
Bug #112; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| N/A | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha |
Type TMyArray = Array[1..2] of String;
Var MyArray : TMyArray;
...
1: If (MyArray[1,1] = 'A') Then ... { this works }
2: If (MyArray[1][1] = 'A') Then ... { this works too }
...
3: If (Memo1.Lines[1,1] = 'B') Then ... { this doesn't work }
4: If (Memo1.Lines[1][1] = 'B') Then ... { this works OK }
Above, normal arrays of strings can be accessed in two ways (1 and 2).
However, string array properties can only be accessed with the case 4.
Case 3 gives error message "Too many actual parameters".
Bug #114; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| N/A | Gotcha | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
Bug #117; last modified: 11-Jun-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha | Gotcha |
How to reproduce the problem:
It tends to happen in complex projects, with very convoluted uses clauses.
We found it in the Pannon-Rex objects unit, in which they set the root
node of a stream registration list to nil in the initialization section.
Unfortunately, the initialization was executed after another unit had already
registered some streamable objects in that unit's initialization clause.
So, the registered objects dropped into limbo, when the root node was reset
to nil...
Why do you think it is a bug?
It's not a bug but a (bad) language design feature really. The basic
message everyone needs to know is that you cannot count on a unit's initialization
clause to execute before code in the unit is called. "Initialization" should
be renamed "Not_really_initialization", in my modest opinion...
Bug #444; last modified: 27-Jul-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Unknown | Fixed | Fixed | Fixed | Exists | Unknown | Unknown |
In importing the MS Script Control the following errors occur:
TScriptControl = class(TOleControl)
...
function Get_Error: IScriptError;
...
property IScriptControl_Error: IScriptError read Get_IScriptControl_Error;
>>> Should be Get_Error - causes compilation error
...
function Run(const ProcedureName: WideString; var Parameters: PSafeArray;
out pvarResult: OleVariant): OleVariant;
>>> Argument out pvarResult: OleVariant should not be there. The routine has only two arguments.
...
end;
Delphi 3 is importing the above unit correctly!
Also in importing the Excel Type Library a number or Excel collection objects, such as Workbooks, Worksheets etc. have default properties. The imported unit of Delphi 4 omits the "default" specifier of these propetries. Again Delphi 3 is handling this issue properly!
From checker:
At least the second problem (the added out parameter) has been
confirmed by Inprise:
On Fri, 24 Jul 1998 11:25:36 -0700, in borland.public.delphi.activex.controls.using "Alain Tadros"Note: this was in reply to a message posted on the newsgroup by Michael Newton describing that same problem.wrote: >Hi Michael, >Yes, it is a known problem for ActiveX Control wrappers in Delphi 4 and we >are working on getting a fix out for it very soon. >Sorry, I don't have an exact date for the release of the fix but very soon. >Thanks >Alain Tadros >Delphi dev Team