![]() |
|||||||||||||||||
|
|
|||||||||||||||||
|
|
|||||||||
|
Delphi |
DELPHI DEVELOPER SUPPORT
Areas of concentration under: activex
Area: activex\ Problem: TColor properties don't work quite right in ActiveX Control Pad. Setting a TColor property either from Control Pad's property editor or from a property page doesn't update the property value displayed in the property editor's list. Steps: 1. Create an ActiveX wrapper around any VCL control that has a Color property, e.g. TPanel. 2. Register the control. 3. Open Microsoft ActiveX Control Pad and add an instance of the control. 4. Select the Color property in the property editor and change it by pressing the *ELLIPSIS* button (not the dropdown list) to get the Windows colour dialog. 5. Note the value displayed in the property list - it's not changed even though the colour change of the control has stuck. Area: activex\ Problem: No easy way to change Class name when installing ActiveX through Install Component. Steps: 1- Import MS Access Calendar to the palette 2- Because of the Class name conflict with TCalendar, change the class name of MS Calendar to TCalendarX 3- Now Create an ActiveX Control based on TCalendar from the sample page. 4- Try importing the newly created AX control 5- no luck because the file CalendarXControl1_tlb already exist on the path 6- Try Install Component and point to the _tlb file, conflict with TCalendarX class from Access with no easy way to change the name. Workaround: 7- The solutions are to remove the MS Calendar from the package or to manually change the TCalendarX class in the D4 ActiveX Control code. Area: activex\ Problem: If a developer wishes to "slide" a class in between TOLEControl and a Delphi generated wrapper class or to modify the wrapper class, then they must ensure that said class includes no data members or that said modification includes no data members before the event pointers. This is because the GetEventMethod routine used to find event pointers expects them to be the first entries in the wrapper class. Area: activex\framework Problem: MS Flex Grid cause an error " Property not available" when trying to compile a Delphi app that uses it. Area: activex\framework Problem: Cannot remove focus from ComboBoxX1 control using Tab or Shift-Tab only when control's container is Delphi 3 or 4. No event occurs and a beep sounds. Steps: --- setup --- 1. File | New... | ActiveX Control 2. Select TComboBox 3. Compile into OCX 4. Register ActiveX 5. Import combobox activex and install into palette. --- test --- 6. File | New Application 7. Drop a TComboBoxX1 onto form and another wincontrol such as TEdit. 8. Run app and try to change focus between controls using tab key. Note that when combobox is focused you cannot remove focus using tab key. Area: activex\framework Problem: When a control or ActiveForm for which threading is set to "Free" or "Both" is registered via Run|Register ActiveX Server, the server remains open for the duration of the current Delphi session. This does not occur when threading is Single or Apartment. NOTE: You need PView or similar process browser to validate this. Steps: 1 - File | New | ActiveX::ActiveForm < OK > [Threading Model: Free] < OK > 2 - Project | Build // Verify that delphi32.exe has no ActiveFormProj1.ocx // open 3 - Run | Register ActiveX Server ... < OK > // The ocx is now open 4 - Drop a button on form (or any change) 5 - Project | Build // Error: Could not create ... ocx 6 - File | Close All | File | New Application // The ocx is still open... Area: activex\framework Problem: The default color of many controls as ActiveX controls is different than its VCL ancestor control. Also, the ParentColor property has no effect. Area: activex\framework Problem: Data bound ActiveX controls- Properties marked as bindable and marked either displaybindable or defaultbindable are the only ones that should appear in the DataBindings Editor. Area: activex\framework Problem: The New/ActiveX page should have an option for creating a plain vanilla COM class without dual interface or automation support. Currently, one must create a new Automation Object, turn off the unwanted features and change the ancestor inteface by hand. Area: activex\framework Problem: With Typed @ Operator switch enabled, compile error in AxCtrls Area: activex\framework\activex controls Problem: [Track for BCB4] Delphi ActiveX Controls are not resizing property within Access 97. [tib- Access may require IViewObject2 support for proper rendering. Most Office apps require IDataObject for rendering support.] Area: activex\framework\activex controls\ Problem: Importing the IE WebBrowser control now generates a wrapper that will not compile. Steps: 1. Component | Import ActiveX control 2. Select MS Internet controls 3. Try to compile the generated file. // Error 'undeclared identifier 'FOnBeforeNavigate'' Area: activex\framework\activex controls\ Problem: Read-Only properties do not surface in wrapper classes. Steps: File | New... | ActiveForm < OK > < OK > View | Type Library Open the IActiveFormX interface node. Delete the setter node for the Caption property. Refresh. F12 Area: activex\framework\activex controls\activeform Problem: [Web deployment] The Wdith and Hieght attrbutes for the ActiveX Control or ActiveForm in the HTML file created during Web deployment should be as large as possible since this is only a test page. Area: activex\framework\activex controls\activeform Problem: Mnemonic keys do not work inside of IE4. They still do not work inside of IE3 but that is due to a bug in IE3. IE4 is broke in the same manner but it does surface notify events that were able to be hooked into as a work around for IE4 Steps: 1. Create an ActiveForm with a TStaticText and a two TEdits. 2. Rename StaticText1 "&StaticText1", and set its FocusControl to Edit1. 3. Run the form in IE, click in Edit2, and press Alt-S. Note that focus doesn't change. Area: activex\framework\activex controls\activeform Problem: Setting the csReflector control style on an ActiveForm causes the form to not appear. This is probably some kind of visibility/resizing bug based on the TReflector class... Steps: 1. Make a vanilla ActiveForm. Build, Web Deploy and view in IE. All's well. 2. Add the following constructor to the AF. constructor TActiveFormX.Create(AOwner: TComponent); begin inherited; ControlStyle := (ControlStyle + [csReflector]); end; 3. Build, redeploy, and view in IE. The form is created (if you set a breakpoint on the above lines of code, it works), but the screen is blank. Area: activex\framework\activex controls\activeform Problem: ActiveForms don't scale properly when printed from IE. Steps: Create default ActiveForm and Web Deploy. Print page from File|Print withing IE 3 - 4 and the ActiveForm will not properly scale. Area: activex\framework\activex controls\events Problem: Controls inheriting from a wrapped Ax control will likely AV when events fire. This is because the GetEventMethod method assume the current class to be the wrapper class when it calls ClassParent and then InstanceSize. This leads to an incorrect calculation for the offset to the event handler fields. Steps: -Import & install the IE4 WebBrowser Ax control -Create & install a descendant component from the wrapped WebBrowser component. -Drop the descendant component on a form. -In the forms OnCreate event handler, call the descendant component's GoHome method. -Run -Note AVs. Area: activex\framework\automation\com servers Problem: Byte does not work as a var or out parameter. (In Invoke the VType of the variants representing the Bytes are not varByRef.) Area: activex\framework\automation\com servers Problem: I create a new ActiveX based on a TEdit (or TButton), register it, import it, and use it on a form. I get a "Property does not exist" exception referring to the TabOrder property at runtime. Steps: 1. Create a new ActiveX based on TButton. 2. Build, Register, and Import the ActiveX. 3. Create a new project. 4. Add the new ActiveX to the app's form. 5. Run Workaround: Edit the form as text and remove the TabOrder property from the ActiveX's properties in the form file. This has to be done every time a property in the ActiveX is changed, of course. Area: activex\framework\automation\com servers Problem: EOleSysError.ErrorCode is an Integer. Needs to be HRESULT (or some other unsigned type). Steps: EOleSysError(E).ErrorCode = DISP_E_EXCEPTION //Always evaluates to False. Area: activex\framework\automation\com servers Problem: Adding a method called Release to an automation object inserts a method called Release, but the interface renames the implementing method to "Release_". This means that the source code generated by the typelib editor will not compile. [tib - This is because the COMMgr and PascalWriter aren't using the same logic -- the Writer is mangling the name to avoid overriding IUnknown::Release, but the name written to the TLB is not mangled, and the COMMgr doesn't add the underscore...] Steps: 1. Make a new automation object 2. In the typelib editor, add a method to the dual interface called "Release". 3. Refresh, and compile the project. Get a compiler error that says "Refresh_" is not defined. If you go to the source editor and rename the function to Release_, then it compiles. Area: activex\framework\automation\com servers\properties\methods Problem: Get a "Bad Variable Type" error when a method on an AppServer is latebound and returns an HResult. Steps:
1) Create an AppServer and add a method simular
to the following:
function TTest.Test(ATestParam: OleVariant;
out ATestParam2: OleVariant): HResult;
begin
Result := S_OK;
if Position then
ATestParam2 := ATestParam[0]
else
ATestParam2 := ATestParam[1];
end;
2) Create a client with a DComConnection that
connects to the server and add a button.
3) in the button's OnClick add the following:
procedure TForm1.Button1Click(Sender: TObject);
var
vTest1, vTest2: OleVariant;
Test: hresult;
begin
vTest1 := VarArrayOf(['Test1','Test2']);
with DC do
begin
Connected := not Connected;
if Connected then
begin
Test := DC.AppServer.Test(vTest1, vTest2); //
This Fails;
// Test := (IDispatch(DC.AppServer) as
ITest).Test(vTest1, vTest2); // This Works;
// DC.AppServer.Test(vTest1, vTest2); // This
Works;
Edit1.Text := vTest2;
end
else
Edit1.Text := '';
end;
end;
4) The two lines of code that are commented out
will work. One should be able to use the HResult
value to determine proper operation.
Workaround: The work around is to early bind it. Area: activex\framework\automation\com servers\thread support Problem:
Here is a slight problem COMObj.pas
IsMultiThread := IsMultiThread or
((CoInitFlags and
(COINIT_APARTMENTTHREADED or
COINIT_MULTITHREADED)) < > 0);
This test will fail to set IsMultiThread to true if
CoInitFlags is COINIT_MULTITHREADED because
COINIT_MULTITHREADED's value is 0.
CoInitFlags := COINIT_MULTITHREADED;
Application.Initialize;
//At this point IsMultiThreaded it false.
Application.CreateForm(TForm1, Form1);
...
end.
Steps: a) if the CoInitFlags is set to COINIT_MULTITHREADED b) IsMultiThreaded will always remain false. Workaround explicitly set IsMultiThreaded to TRUE. Area: activex\framework\dax Problem: Stack Overflow in VB and IE 3 &4 when a D4 ActiveForm containing a Delphi4 generated ActiveX Control and then pressing any of the arrow keys when the control is highlighted. The problem occurs in TranslateAccelerator in AxCtrls.pas. Happens in D3.02 also. Steps: 1- Create an AX control from TEdit 2- Drop it on an ActiveForm 3- Regiter. 4- Drop the active form on a VB form and run 5- Press any of the arrow keys. 6- Stack Overflow. 7- VB will shut down. Area: activex\framework\dax Problem: The destructor for TComObjectFactory is failing to call CoRevokeClassObject for free (or both) threaded objects. This result in an AV (Runerror 216) at application exit. Area: activex\ide Problem: Modifying a property page does not mark the activex control (or associated DFM) as Modified. Steps: 1) Create a new TButton OCX via File | New | ActiveX | ActiveX control 2) Create a property page and hook this up to the TButton via DefinePropertyPages 3) Implement the TButton to update the button's Caption in the UpdatePropertyPage and UpdateObject 4) Save all of the files 5) Register the OCX 6) File | New application 7) Import the OCX using Component | Import ActiveX control 8) Place the control on the form 9) Save everything 10) File | Close All 11) Open the project saved in step 9 12) Use the property page to edit the button caption. Notice that the editor does not think the property has been changed. If you close all again, you will be left with the same preoprty values as before. Area: activex\ide Problem: An IDE error handling dialog has ungrammatical sentence in it Steps: Start Delphi 4 Create a new component class, maybe with TButtonControl as a base class, called TButtonControl1 In the new component dialog, press Install, and install it into the default component package, but do _not_ compile the package Now create a new ActiveX control, based upon your new component. Your component class will be in the list of available base classes When you have filled in the new ActiveX dialog and press OK, a new ActiveX control library will be made, however, as it is being prepared for the new ActiveX control, you will get a message dialog saying: "Could not load unit ButtonControl1 symbol information for TButtonControl1 Do you want to try to find this file yourself?" Observe the lack of grammatical correctness and punctuation? Something like the following reads a bit better: "Could not load unit ButtonControl1 (symbol information for TButtonControl1). Do you want to try to find this file yourself?" Area: activex\ide\register activex server Problem: Get "Runtime error 216" when registering an ActiveX Control. After clearing the error, all seems OK. but the control will not be closed when the project is (so if any attempt to rebuild will fail because the .ocx is locked) Steps: 1-File | New | ActiveX::ActiveX Control [VCL Class Name: /* any class */] < OK > 2-Run | Register ActiveX Serve Area: activex\ide\web deploy Problem: Versioning Information conflicts between Project|Options and Web Delpoy Options. When choosing Web Deployment Options, the Project tab allows "Include file version number" as well as "Auto increment release number". If web deploy several times and then choose the HTML file will reflect the incremented release number, but if you then choose Project|Options and look at the Version Info tab, the numbers there don't match. Also, simply viewing this page resets the release number. Steps: 1) Create an ActiveForm. 2) Choose to "Include file version number" as well as "Auto increment release number" 3) Web Deploy several times to increment release number. 4) View auto-created HTML page to see version number has incremented from 1.0.0.0 5) Choose Project|Options and then the Version Info tab. 6) Cancel out of the dialog 7) Web Deploy 8) Check HTML page and see that it has reset to 1.0.0.0 Area: activex\ide\web deploy Problem: There is no error message if the WebDeploy cannot overwrite your OCX file. Steps: 1. Create, build, and web-deploy an OCX file. 2. Lock the OCX file so it cannot be overwritten. (For instance, if you open the HTML file in IE and don't close it). 3. Change, build and re-deploy the OCX file. Answer Yes to all the "overwrite?" dialogs. 4. Look at the date of the deployed OCX file--it is the same as the old one. The problem is, no "can't overwrite the file" error message appeared. Area: activex\ide\web deploy Problem: The Delphi4 Ax's only ever down load ONCE even with changed version information. Steps:
a) create an AX, make sure your have version
information linked and set to increment with builds
b) deploy the AX to a webserver
c) hit the webserver you deployed it to.
d) The Ax will download and will display
e) change the Ax's color in the IDE and rebuild.
f) re-deploy, the AX
g) hit the webserver again
h) you should ONLY the the old AX the new one will
not download to your machine.
i) the problem is in the HTML that is produced by
the IDE
codebase="http://getafix2/Project1.ocx"#version=
1,0,0,9
the last quote is in the incorrect place!!!!!!!
codebase="http://getafix2/Project1.ocx#version=1
,0,0,9"
j) if you change the HTML page on the server and
move the quote new Ax will down load.
Area: activex\ide\web deploy Problem: The version number is missing from the CODEBASE element of the OBJECT tag when web deploying an OCX in an INF file. Area: activex\ide\web deploy Problem: Web deploy fails if you are deploying to a non-existent directory. This should either prompt user to see if they want the directory to be created, or it should just create the directory. Steps: Create an active form and attempt to deploy it to a directory which does not exist. An error message saying "Could not create file." is all that appears. Area: activex\type library Problem: Machine hangs after typing anything in the Pascal Text page for a new Enum. Steps: 1- File | ActiveX | Type Library 2- Create a new Enumeration Type 3- Open the Text page 4- try to type in a const name Area: activex\type library Problem: Add to Interface Access violation message in hint text when attempting to add a property of any type. [Note: this appears to be the case for "COM Object" only. I did not encounter it when testing with Automation objects or controls.] Steps: File | New Application File | New... | ActiveX | COM Object < OK > Enter 'Test' Check Include Type Library < OK > Click on the Code Editor to give it focus, making sure Unit2 is the active unit. Edit | Add To Interface... Enter the following... property x:Integer Note AV message in hint text. Pressing OK here yields a dialog with the same message text. Area: activex\type library Problem: This is a regression, it used to happen in Beta and was fixed, but got broken again... The _TLB file of a new project gets confused with a previous Project1_Tlb existing in the same directory and asks to reload the old one. Steps: While having a project1_tlb in your current directory, create an Ole Automation server. Add something to the TLB. Lose focus from Delphi. Get focus back to Delphi MSGBOX "reload" ? say yes and you lose your entire TLB to the old one in the directory. Area: activex\type library Problem: Type libraries marked as Hidden can not be switched to None or Restricted or Control from the TLB Editor. As soon as you refresh or save it goes back to Hidden. Area: activex\type library Problem: Can not inherit from an Interface declared in a seperate TLB. Steps: 1- Create a TLB with one Interface and one CoClass 2- Use an external TLB from the Uses Tab 3- Try to inherit your Interface from one of the Interface of the external TLB. 4- It does not show in the ComboBox. Area: activex\type library Problem: The STDVCL32 entry in the TLB editor should be allowed to get UNCHECKED. If someone wants to have a standalone ActiveX Control that uses IStrings for instance, they might implement the IStrings interface with the same GUID in their code. But they will not be able to UNCHECK the STDVCL32 from the TLB editor. Area: activex\type library Problem: PascalWriter: Type VT_UI4 is being mapped to Pascal type Integer (4 byte signed), but s/b mapped to LongWord (4 byte unsigned). Note that in activex.pas declaration of tagVARIANT, the VT_UI4 case is different from the above, but also seems incorrect: (ulVal: Longint) Steps: 1 - File | New Application 2 - File | New | ActiveX::Type Library < OK > 3 - < Record > < Field > < Enter > 4 - // Change Field1 type to unsigned long 5 - < Refresh > // See _TLB.PAS for decl Area: activex\type library Problem: Importing a Type Library that contains Classes that conflicts with Delphi classes while its _TLB is open in the editor causes the classes not to be imported to the correct name modified in the wizard. Steps: 1- Import Outlook Type Library. 2- It brings with it MSForms tlb 3- But MSForms contains controls with names like TImage, TListBox , etc... 3- With MSForms_tlb open in the Editor, import FM20.DLL from system directory 4- Change the name of conflicting controls 5- Notice that the File Imported with wrong names for these controls. Area: activex\type library Problem: [Corba IDL] Corba union case statements require a complete statement, i.e.: case 1: templ; Where we are unable to find a suitable type to map to from the original vardesc type, we write out: case 1: /* temp: Unsupported type: temp */ We need to encapsulate the case entirely in the comment (but I think continue to increment the case index). Area: activex\type library Problem: Steps: Do the description notice the cursor position is at the end of the line. Area: activex\type library Problem: I had assumed that the ability to specify "All v-table interfaces" in the TypeLib options was to fix the Delphi 3.00 incompatibility problem that Joe Bently and I discussed at length last year. While it appears that this option works for newly created TLB files, it won't allow one to load an existing TLB file and maintain the Delphi 3.00 syntax in the _TLB.PAS file. So the "with workaround" of this failure appears to be: recreate your TLB from scratch. Steps: 1. Using Delphi 3.00 (not 3.01 or 3.02), Create a typelibrary. 2. Create an interface, making it an IUnknown descendant. 3. Add some properties. 4. Refresh and save the .TLB. 5. Make a copy of the just saved _TLB.PAS file. 6. Using Delphi 4.0, open the .TLB file. 7. Change the description of the TLB (so that the IDE will recreate the _TLB.PAS file). 8. Press F12 and compare the _TLB.PAS file with the one created by Delphi 3.00. Area: activex\type library Problem: When you change the name of an Interface in the TLB editor and then refresh, the new name along with the old name are in the class declaration of the implementation file. Workaround: Delete the old name and everything works fine. Area: activex\type library Problem: When attempting to save a type library with translation errors, an error dialog appears. It is unclear as to what 'information' may be lost or modified. Might this be made clearer? Area: activex\type library Problem: Where documentation string 'helpstring' is null (ptr value of zero), we save a zero-length string. Steps: tlibimp -C- -P- -1tligen.tlb c:\winnt\system32\stdole32.tlb tlibcomp -b -ostdole32.txt c:\winnt\system32\stdole32.tlb tligen.tlb Area: activex\type library Problem: The Ole Automation checkbox on the flags page is initially enabled. It should be disabled if the Dual checkbox is initially checked. Steps: File | New Application File | New... | ActiveX | Automation Object Enter Foo, < OK > In the Type Lib Editor, Click on the IFoo node and give the Flags page focus. Note that the Ole Automation checkbox is enabled. Unchecking and re-Checking the Dual checkbox properly disables the Ole Automation checkbox, but leaving and returning to the same interface node shows the same initial behavior. Area: activex\type library Problem:
In the TypeLib editor, if the TypeLib's help string is
unmodified ('Project1 Library' etc) and the name of
the type library is changed, the help string should
reflect this...
otherwise, users end up with a whole bunch of
libraries registered as 'ActiveFormProj1 Library' or
'ButtonXControl1 Library' or the like unless they
fanatically open up the TypeLib editor and change
the help string after doing the SaveProjectAs.
Steps:
create one of the easy projects involving a TypeLib,
that doesn't automatically open the TypeLib editor...
either:
File | New... ActiveX | ActiveXControl (select
TButton, and keep defaults)
or
File | New... ActiveX | ActiveForm
or
File | NewApplication
File | New... RemoteDataModule (give it a clever
name)
or
File | New... ActiveX | ActiveXLibrary
File | New... RemoteDataModule (give it a clever
name)
then:
File | SaveProjectAs... (use some distinctive names)
View | TypeLibrary
< <
the name of the TypeLib has changed nicely,
but the Help String is still the default value.
> >
Area: activex\type library Problem: Type Lib Editor.Interface.Method.Parameters. Increase the number of items in the Type dropdown combo box. Widden the Type column. // Note the truncated items Steps: - File | New | ActiveX | Type library - Click the Interface button - Click the Method button - Set focus to page Paramters - Set the Modifier column to 'abc' - Open the 'Type' combobox and scroll down Workaround: resize the type column before opening the combobox Area: activex\type library Problem: Typelib editor supports viewing typelibs that contain structs and typedefs, but you cannot create typelibs that contain such elements -- including others like modules and unions. You should be able to edit any standard typelib element. Area: activex\type library Problem: Making changes to the 'uses' statment in Pascal Text page has no effect (either adding or removing). The items listed/selected on the "Uses" page remain the same. Steps: 1 - File | New Application 2 - File | New | ActiveX::Type Library < OK > 3 - < Select page: Text > 4 - // Remove STDVCL40.DLL from 'uses' statement. Add OLEPRO32.DLL 5 - < Select page: Uses > // no diff 6 - // Save and reopen -- the uses changes were ignored... Area: activex\type library Problem: Module member declarations on the text page are corrupted when changing from IDL mode to Pascal mode "on the fly", and things get worse when you add more... Note however, that the corruption appears to be more display-related than real. The tlb can be saved, and a dump of the tlb shows all to be there. Steps: 1 Tools | Environment Options | Type Library < IDL: CHECKED > < OK > 2 File | New Application 3 File | New | ActiveX::Type Library < OK > 4 < Module > < Enter > < Const > < Const > < Const > 5 Tools | Environment Options | Type Library < Pascal: CHECKED > < OK > 6 < RClick "Module1" node > // in tree view 7 < Select page: Text > // Look at the bogus decls 8 < Module > < Const > < Const > < Enter > // look at the decls // for this module. more corruption... Area: activex\type library Problem: In the TypeLibrary-Editor if you select ViewErrors from the popup menu, the Splitter is positioned below the Error-Window instead above it. So it is impossible to resize the Errorwindow. Insted the Statusbar is resized. Area: activex\type library Problem: Fields in records and unions should allow the selection of other record or union types in the current or imported libraries. [You can do this -- they just aren't appended to the types listbox list...] Workaround is to go to the Text page and type it in. Steps: File | New... | ActiveX | Type Library Click once on < Record > (- > Record1) Click once or twice on < Field > Click again on < Record > (- > Record2) Click once again on < Field > Open the dropdown of the Type combobox on the attributes page. Note that Record1 is absent. Area: activex\type library Problem: The type library editor cuts off the last two letters in Modifi(ed) on the status bar. Area: activex\type library Problem: When a dispinterface is added to a typelib without an interface node, the Parent Interface field is blank. Steps: 1-File | New | ActiveX::Type Library < OK > 2- < Dispatch > < Enter > // "Attributes" page, "Parent Interface" is blank // EXP: Contents=IDispatch; State=disabled Area: activex\type library Problem: Save desktop settings are ignored with the type lib editor. Steps: If you close all and import a type library, then close Delphi (with save desktop settings) When you restart. The splash screen comes up, goes away, you see a flash of the type lib editor, then the spash comes back and delphi starts a default project. Area: activex\type library Problem: Try as you might, you cannot change a dispinterface to an interface, or vice versa. Applies to both IDL and Pascal mode. Workaround: Use copy/paste Steps: 1 - File | New | ActiveX::Type Library < OK > 2 - < Dispatch > < Enter > 3 - < Select "Text" page > 4 - // Change 'dispinterface DispInterface1' // to 'interface DispInterface : IDispatch' 5 - // Add 'dual' to flags // The change in element type has not been detected, // so the entry is flagged as an error Area: activex\type library Problem: An extra colon character is appended within the body of a dispinterface where the dispinterface declaration text is user-modified. (the steps must be followed exactly, so not apparently a pervasive problem). Only seems to apply to IDL mode, not Pascal Steps: 1 - File | New | ActiveX::Type Library < OK > 2 - < DispInterface > < Enter > 3 - < Select Page: Text > 4 - set focus to text, then < Ctrl-Home > < Spacebar > // add a leading space 5 - < Method > < Enter > 6 - set focus to DispInterface1 tree node. Note extra colon at the end of the Method1 decl Area: activex\type library Problem: Assertion text in IDLWRITE.PAS, line 314 has spelling error: VT out of rangle (s/b range) [Assertions will no longer be displayed... -tib] Area: activex\type library Problem: Status line display of error "CoClass must implement at least one default interface" does not clear after action is taken to correct it. Refresh and save work, though, so it must just be the status line itself that fails to get refreshed. Steps: 1 File | New Application 2 File | New | ActiveX::Type Library < OK > 3 < Interface > < Coclass > < Enter > 4 < Refresh > // Get error because no default intf assigned 5 < RClick > Insert Interface [Interface1] < OK > 6 < Refresh > Area: activex\type library Problem: There is no way to remove type library from a project, from within the IDE, once you've added it. You must manually delete the .tlb and _TLB files. Area: activex\type library Problem: In the TLB Editor, double-clicking in the Error-log pane should focues the problem-item in the editor (just like the message log in the text editor). Steps: 1. Open the DelCtrls demo project 2. Notice the hint messages in the TLB Editor error log (i.e.: "Hint: TxAlignment.taRightJustify changed to taRightJustify_' 3. Double click a hint message. 4. Nothing happens Would be better to focus on the problematic item in the TLB Editor. Area: activex\type library\code generation\ Problem:
We are not emitting typedefs for
RECORD/UNION/ENUM correctly where they
have ALIAS records in the tlb
whose HREFTYPE points back to them, like (from
original MIDL idl):
typedef [public] enum tagEnum2 { ... } Enum2;
// RECORD=tagEnum2; ALIAS=Enum2. The
// HREFTYPE for the alias resolves to the record
emitted Corba IDL:
typedef tagEnum2 Enum2;
typedef enum tagtagEnum2 { ... } tagEnum2;
This is wrong because:
1) tagEnum2 ref (not yet declared) is used in the
Enum2 typedef
2) We end up creating a new enum 'tagtagEnum2'
and create an alias of the actual enum name
tagEnum2. We could really just emit something in
form close to the original MIDL...
Area: activex\type library\code generation\pascal Problem: Wrong code generated in the _TLB.pas file in the TOleControl wrapper when a function is added to the control. Steps: 1- Create a TButton ActiveX Control 2- From the TLB add the function Hello: integer; 3- refresh 4- Go the _TLB.pas file and notice the TOleControl wrapper code. 5- The function got generated like Function Hello(out retval: integer): integer; Area: activex\type library\code generation\pascal Problem: Put property setter methods are preferred over putbyref setter methods in interface property declarations. NOTE: This is as designed now, but it works correctly now. Steps: 1-File | New | ActiveX::Type Library < OK > 2- < Interface > < Property: Read|Write|WriteByRef > < Enter > 3- < Refresh > 4- < F12 > // Interface1 should look like: function Get_Property1: Integer; safecall; procedure _Set_Property1(Value: Integer); safecall; procedure Set_Property1(var Value: Integer); safecall; property Property1: Integer read Get_Property1 write _Set_Property1; Area: activex\type library\code generation\pascal Problem: With safecall function mapping set to 'Do not map', function still get munged (hresult removed & out, retval arg used for return type) as though safecall. Area: activex\type library\code generation\pascal Problem: Unchecking the Dual and Ole Automation flags on an interface in the Type Library Editor causes the methods of the interface not to be converted to the correct syntax. Like if you have a function foo that returns an integer, it should become a function foo with 1 retval out integer param and an HResult return type. Area: activex\type library\code generation\pascal Problem: The byref Font property setter method (Set_Font) for Ax controls & forms has no implementation. Steps: File | Close All File | New... | ActiveX | ActiveForm < OK > < OK > Search for TActiveFormX.Set_Font in the implementation unit. Note the empty method body. Area: activex\type library\code generation\pascal Problem:
In the generated wrapper class for imported MS
OutLine Control, some property names incorrectly
include the name of a different interface described
elsewhere in the type library. The read and write
methods for said properties are similarly altered. For
example, instead of
property Timeout[event: Smallint]: Integer read
Get_Timeout write Set_Timeout;
the following is yielded
property INMOleClientControl_Timeout[event:
Smallint]: Integer read
Get_INMOleClientControl_Timeout write
Set_INMOleClientControl_Timeout;
Steps: File | Close All File | New Application Project Import Type Library Select MS Outline Control /* attached */ < OK > Ctrl-F9 Area: activex\type library\code generation\pascal Problem: Importing the Microsoft DirectAnimation Type Library (Version 1.0) does not produce compilable code. The getter for the DC property returns a wireHDC but the setter expects the address of a _RemoteHandle record. Steps: File | New Application Project | Import Type Library Select DirectAnimation Library (Version 1.0) < OK > Ctrl-F9 to compile. Note compilation errors. Area: activex\type library\code generation\pascal Problem: Pointer property types leaking into 'property' declarations. Area: activex\type library\code generation\pascal Problem: If a control project is created/opened, then safecall mapping is changed to none, syntax errors will occur the next time the _TLB.PAS file is refreshed. Note that this safecall mapping option is not allowed for controls, and the IDE will in fact disallow creation of a control with this option set to "Do not map", so this is kind of a negative case... Area: activex\type library\code generation\pascal idl Problem: Declarations for module are corrupted on text page. For each member added, a pair of 'const' and 'type' tokens are added to the decl. Steps: 1-File | New | ActiveX::Type Library < OK > 2- < Module > < Enter > 3- < Select page: Text > // erroneous 'const' above 'type' 4- < Method > < Enter > 5- < Const > < Enter > Area: activex\type library\code generation\pascal idl Problem: The parameter for PROPERTYPUTREF setter functions are being flagged [in, out] by default. They should just be 'in'. This also means the putref param is 'var' in the _TLB interface class method decl where it had not been before. Steps: 1 Tools | Environment Options | Type Library < IDL: CHECKED > < OK > 2 File | New | ActiveX::Type Library < OK > 3 < Interface > < Enter > 4 < Property: Read/Write/WriteByref > < Enter > 5 < Select page: Text > // See decl for Property1's propputref method Area: activex\type library\code generation\pascal idl Problem: If the default interface or default event dispinterace names are changed, the change is not reflected on the Text page in IDL. Shows up correctly on Implements page, and in _TLB following a Refresh. Steps: 1-File | New | Application 2-File | New | ActiveX::Automation Object [Jamba] < Generate event support code: CHECKED > < OK > 3-// Change 'IJamba' to 'IBigJamba' 4- < Refresh > 5-//set focus to coclass node 6- < Select page: Text > // IJamba is still [default] Area: activex\type library\editor\error handling Problem: AV when TypeLib Editor tries to change the Invoke Kind of a Write by Reference Property accessor in an Interface. A second AV follows when another property is added. Steps: File | New... ActiveX | TypeLibrary add an Interface use dropdown on Property button to add a Read | Write | WriteByRef Property select the third Property1 item in the Treeview (this is the WriteByRef accessor) now on the Attributes tab page, change the Invoke Kind to "Property Get" // correct warning is shown on the Status Bar then change the Invoke Kind to "Property Put" < < AV in TLib40 message shown in the Status Bar > > try to add a normal Property to the Interface, < < AV in VCL40 > > Area: activex\type library\editor\error handling Problem: When one of the setters for a property with both a PUT and PUTREF is changed so they are both one type or the other, we end up with 2 identical signatures in the idl code. In the Pascal output, one of the names gets mangled to disambiguate them so this is not harmful. However, we might want to consider adding the mangling logic to the idl also... Steps: 1-File | New... ActiveX | TypeLibrary 2- < Interface > < Property: Read/Write/WriteByRef > < Enter > 3- < Attributes: Invoke Kind: Property Put > // Change the put // by ref to put 4- < Refresh > 5-// Select Interface1 node, then < Select page: Text > // See there are now two identical propput procs Area: activex\type library\editor\flags page Problem: If coclass flag checkbox "Predefined" relates to the IDL attribute 'predeclid', it should not be enabled. MIDL will not accept 'predeclid' via IDL on a coclass, but applies it internally. The attached shows this. Area: activex\type library\editor\flags page Problem: Logic of the Flags tab for Interfaces needs to be improved: After first time clicking on the Flags tab of an Interface, both Dual and Ole Automation checkboxes are checked and active. Unchecking Ole Automation, there comes up an error message that this is not allowed, but the box is unchecked anyway. It would be better to make 'Ole Automation' inactive when Dual is checked. This is the case when Dual is unchecked, then checked again. Steps: start Type Lib Editor add an Interface click on Flags tab Dual and Ole Automation are checked uncheck Ole Automation Error message: Would be better to make it inactiv instead uncheck dual checkbox check dual checkbox other than in the beginning, Ole Automation is now inactiv Area: activex\type library\editor\flags page Problem: The Flag/checkbox 'Replaceable' s/b disabled and unchecked for Interfaces and Dispinterfaces. It is enabled. Any attempt to check it is flagged as an error. The trouble is, we go ahead and check it and add it to the text page anyway. Steps: 1 File | New Application 2 File | New | ActiveX::Type Library < OK > 3 < Interface > < Enter > 4 < Select page: Flags > 5 < Replaceable: CHECK > // Error: ...flag only allowed on CoClasses < OK > // checkbox is checked; keyword is in text... Area: activex\type library\editor\general ui |