delphi-xe2

Can a record be used as a property of an object?

两盒软妹~` 提交于 2019-12-20 10:38:29
问题 I'd like to make a record as an object's property. The problem is that when I change one of the fields of this record, the object isn't aware of the change. type TMyRecord = record SomeField: Integer; end; TMyObject = class(TObject) private FSomeRecord: TMyRecord; procedure SetSomeRecord(const Value: TMyRecord); public property SomeRecord: TMyRecord read FSomeRecord write SetSomeRecord; end; And then if I do... MyObject.SomeRecord.SomeField:= 5; ...will not work. So how do I make the property

Delphi XE2 RTTI broken?

左心房为你撑大大i 提交于 2019-12-20 10:01:12
问题 I recently migrated from D2010 to DXE2 and found a showstopper bug (Or feature?) in XE2 and XE3 (Tested in my friend XE3) related to RTTI generation for TBytes fields inside classes. I found that the RTTI information for a TBytes variable inside a class is never generated. The following code works well in D2010, but shows the message "Error" in XE2/XE3 Does anyone have any clue? This will totally break all our software data serialization implementation To test the code please add Rtti unit to

Delphi XE2 RTTI broken?

本小妞迷上赌 提交于 2019-12-20 10:00:14
问题 I recently migrated from D2010 to DXE2 and found a showstopper bug (Or feature?) in XE2 and XE3 (Tested in my friend XE3) related to RTTI generation for TBytes fields inside classes. I found that the RTTI information for a TBytes variable inside a class is never generated. The following code works well in D2010, but shows the message "Error" in XE2/XE3 Does anyone have any clue? This will totally break all our software data serialization implementation To test the code please add Rtti unit to

Is there any Delphi XE2 styles gallery?

狂风中的少年 提交于 2019-12-20 09:55:51
问题 In XE2 there is a new function : 'styles', for VCL( .vsf) and Firemonkey ( .styles), and some are provided in C:\Program Files\Embarcadero\RAD Studio\9.0\Redist\styles directory. As it seems to be easy to create a new style, is there any 'styles Gallery' Web site or blog somewhere ? 回答1: No, for the moment there is no such thing like a gallery of styles for FireMonkey or VCL styles. But if you want to create you own try these entries in my blog which show an easy way to create/modify new VCL

Does interface delegation of an inherited interface require a wrapper class?

混江龙づ霸主 提交于 2019-12-20 01:43:49
问题 Delphi allows for interface delegation using the implements keyword. For example IIndep1 = interface function foo2: integer; end; IIndep2 = interface function goo2: integer; end; TIndep1And2 = class(TInterfacedObject, IIndep1, IIndep2) private FNested : IIndep1; //e.g. passed via constructor or internally created (not shown here) public Constructor Create(AIndep1: IIndep1); function goo2: integer; property AsIndep1 : IIndep1 read FNested implements IIndep1; end; That works well, but not for

Delphi XE2 background IDE compiler unable to find source path

吃可爱长大的小学妹 提交于 2019-12-19 16:38:05
问题 I just bought XE2 version, installed the update 1 ISO, and made my Open Source projects compile with it. In fact: I added the source code paths of the library to the general settings IDE (for all platforms I use, i.e. Windows 32 bit and 64 bit up to now); I compiled the TestSQLite3.dpr regression tests of our framework - no problem: EXE is compiled and all tests passed; I've a strange issue with the IDE background compilers: even if the project compiled, the IDE displays some errors about

Delphi XE2 background IDE compiler unable to find source path

对着背影说爱祢 提交于 2019-12-19 16:37:21
问题 I just bought XE2 version, installed the update 1 ISO, and made my Open Source projects compile with it. In fact: I added the source code paths of the library to the general settings IDE (for all platforms I use, i.e. Windows 32 bit and 64 bit up to now); I compiled the TestSQLite3.dpr regression tests of our framework - no problem: EXE is compiled and all tests passed; I've a strange issue with the IDE background compilers: even if the project compiled, the IDE displays some errors about

Does Delphi XE2 FireMonkey support Indy for cross-platform apps?

徘徊边缘 提交于 2019-12-19 06:05:24
问题 Looking at the new Delphi XE2 with Firemonkey. Considering that it compiles for Windows, Mac OSX and iOS, VCL components are useless in a FireMonkey application. My question is: Is there/will there be an Indy Firemonkey Edition? Cause I seriously need the IdHTTP.Post(); . If not, is there a way to do this in FireMonkey? I have been googling for quite awhile now, not finding anything. :S 回答1: VCL means Visual Component Library . There's nothing about Indy that is "visual" (meaning "seen at

Does Delphi XE2 FireMonkey support Indy for cross-platform apps?

空扰寡人 提交于 2019-12-19 06:05:24
问题 Looking at the new Delphi XE2 with Firemonkey. Considering that it compiles for Windows, Mac OSX and iOS, VCL components are useless in a FireMonkey application. My question is: Is there/will there be an Indy Firemonkey Edition? Cause I seriously need the IdHTTP.Post(); . If not, is there a way to do this in FireMonkey? I have been googling for quite awhile now, not finding anything. :S 回答1: VCL means Visual Component Library . There's nothing about Indy that is "visual" (meaning "seen at

Delphi: How to use ShowWindow properly on external application [duplicate]

感情迁移 提交于 2019-12-18 16:56:30
问题 This question already has an answer here : How can I make the second instance of my program pass control back to the first instance? (1 answer) Closed 5 years ago . See also: How can I tell if another instance of my program is already running? i use the following code before starting my application, to check if another instance of it is already started: var _PreviousHandle : THandle; begin _PreviousHandle := FindWindow('TfrmMainForm',nil); if _PreviousHandle <> 0 then begin ShowMessage(