delphi-xe4

How to convert Rich Text RTF to plain or HTML in Delphi XE4?

大城市里の小女人 提交于 2019-12-23 12:27:48
问题 In Delphi XE4 FireMonkey, I have some RTF in a stream from a database. It uses only fonts, sizes, bold and italics. How can I extract the plain text or convert it to HTML? Can I somehow use JVCL's component(s) even though I'm using FireMonkey ? 来源: https://stackoverflow.com/questions/21612243/how-to-convert-rich-text-rtf-to-plain-or-html-in-delphi-xe4

Passing NULL value into parameterized delphi SQL server query

◇◆丶佛笑我妖孽 提交于 2019-12-23 09:57:36
问题 I am trying to pass in a null value to a TSQLDataset parameter. The query has the form: Query_text:='MERGE INTO [Table] USING (VALUES (:A,:B)) AS Source (Source_A, Source_B) .... WHEN MATCHED THEN UPDATE SET A = :A WHEN NOT MATCHED THEN INSERT(A, B) VALUES (:A,:B); SQL_dataset.CommandType:=ctQuery; SQL_dataset.CommandText:=Query_text; SQL_dataset.ParamByName('A').AsString:='A'; SQL_dataset.ParamByName('B').AsString:={ COULD BE NULL, OR A STRING }; SQL_dataset.ExecSQL; Parameter B is nullable,

Delphi XE4 “class not found” but compiles fine

百般思念 提交于 2019-12-23 09:11:21
问题 The GUI for my company's main product was written in Delphi in the late '90's, and has been updated to Delphi 2007. I'm working with a group to update the Delphi 2007 to XE4. We still use a number of components from ADL VCL (similar to DevExpress, but now defunct), but have not installed the entire package. Rather, we have the files we need located in a folder seperate from our project folder, and have the path to these files specified in: Tools-Options-Library-browsing path and Project

Detect if string contains a float?

早过忘川 提交于 2019-12-23 03:05:34
问题 How can I detect if a string contains a float. For example: '0.004' But without using StrToFloat because that function are slow but rather by iterating through chars. function IsInteger(const S: String): Boolean; var P: PChar; begin P := PChar(S); Result := True; while not (P^ = #0) do begin case P^ of '0'..'9': Inc(P); else Result := False; Break; end; end; end; This will check if string is a positive integer but not a float.. 回答1: I would use TryStrToFloat(): if TryStrToFloat(str, value,

Drag and drop unicode TText in DelphiXe4

自古美人都是妖i 提交于 2019-12-23 02:52:44
问题 I am trying to make a chessboard gui in DelphiXE4 with TRectangle & TText using unicode chess pieces (see StackOverflow Delphi chess unicode linkand drag and drop but I cannot get DND to work properly! My test project is FireMonkey FMX. I have tried various code additions to DragDrop/DragOver Events including using Accept & Source in code but to no result. I set dragdrop to auto on TRectangle & TText components & can get drag function but no drop function! What code do I need to enter in

Delphi XE4 iOS Application failed codesign verification

人走茶凉 提交于 2019-12-22 08:35:23
问题 I have a problem I can not solve with the Application Loader stating: "Application failed codesign verification. The signature was invalid, contains disallowed entitlements, or it was not signed with an iPhone Distribution Certtificate" Here are some screenshots of my Delphi configuration: Can any one point in the correct direction of things to check? I have doublechecked my mobile provisioning is correct. I have doublechecked certificate ID correct. (I even tried enter a madeup one just to

Is it possible in Delphi XE4 to change the app short title without making it the same as the Project dpr name?

本秂侑毒 提交于 2019-12-22 04:31:41
问题 I am writing my first delphi-powered iPhone app. I have created it but I would like it to be named something other than the name of the .dpr file because dpr files cannot contain spaces, for instance, EXE names are not always the same as the human-readable name one might assign an App. Wherease in Windows Delphi apps the EXEs are named the same as the .dpr file which is fine because the english name in your shortcut, or your localized name on your desktop or in your start menu in any other

Delphi Unicode String Length in Bytes

被刻印的时光 ゝ 提交于 2019-12-21 04:13:22
问题 I'm working on porting some Delphi 7 code to XE4, so, unicode is the subject here. I have a method where a string gets written to a TMemoryStream, so according to this embarcadero article, I should multiply the length of the string (in characters) times the size of the Char type to get the length in bytes that is needed for the length (in bytes) parameter to WriteBuffer. so before: rawHtml : string; //AnsiString ... memorystream1.WriteBuffer(Pointer(rawHtml)^, Length(rawHtml); after: rawHtml

Delphi XE4 immutable strings

霸气de小男生 提交于 2019-12-20 11:52:58
问题 With Delphi XE4 for the iOS platform a new string type was introduced: Immutable zero based strings. So far Delphi had copy on write mutable strings. So the question is, what does that mean for my future programming? Are there any advantages of one string type over the other? What are the pitfalls I need to take care of when switching to the new string type (Other than the obvious 0 vs 1 base)? 回答1: According to Marco Cantù's whitepaper, the string data type in the XE4 iOS target is not in

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