delphi-xe6

Application isn't responding - Delphi XE6 - Android

六眼飞鱼酱① 提交于 2019-12-13 16:32:43
问题 On Android, when I touch the screen during a long function (required time > 30 sec) 15sec after the click, a message "Application isn't responding" appears. I don't want to see it. I did a test project, with 2 buttons and a function "LongProcess" for simulate a long process (it's just a sleep of 30 sec). My first button "LaunchFunction" just call the function. My second button "LaunchThread", launch a Thread who will execute my "LongProcess". In the first case I have my problem but in the

Socket Error #113 No route to host on Android

三世轮回 提交于 2019-12-13 15:17:35
问题 In a Delphi XE6 FireMonkey app, when I press the button, I get the following error on Android: Socket Error #113 No route to host procedure TForm1.Button1Click(Sender: TObject); var Intent: JIntent; datosPost: TIdMultiPartFormDataStream; mRespuestaPost: String; begin try datosPost := TIdMultiPartFormDataStream.Create; datosPost.AddFormField('usuario', txtUser.Text); datosPost.AddFormField('password', txtPass.Text); mRespuestaPost := DataModule2.IdHTTP.Post ('http://X.X.X.X/CGLB/ac.php',

Can RAD Studio 2007 to XE6 be installed from pure command line?

☆樱花仙子☆ 提交于 2019-12-13 07:36:09
问题 I am not sure if RAD Studio from 2007 to XE6 are using same type of installer to package. As end user of RAD Studio, I always run Setup.exe in RAD Studio and perform the installation by selecting options from the wizard dialogs page by page. Is there any options in RAD Studio installer that may perform the installation via command line only without GUI dialogs? 回答1: Some useful links regarding silent Delphi installs, not really an answer but what I found doing my own research http:/

How I get the new Field Value from a TClientDataset in Delphi?

萝らか妹 提交于 2019-12-13 02:09:42
问题 hi i have a problem with TClientDataset in Delphi. I want to get a Dataset with the changed Data. here is my code: procedure TForm2.btnUpdateClick(Sender: TObject); var I: Integer; counter : Integer; //for testing value : String; begin if not Self.DatasetArtikel.Active then begin ShowMessage('Nicht aktiv'); Exit; end; if Self.DatasetArtikel.ChangeCount = 0 then begin ShowMessage('Delta is empty'); Exit; end; counter := DatasetArtikel.ChangeCount; //DatasetArtikelUpdate.ClearFields; /

How to import IDL into Delphi?

与世无争的帅哥 提交于 2019-12-12 15:23:47
问题 How do i import an Interface Definition Language ( idl ) file into Delphi; converting the types and interfaces to a pascal file? I've tried: File , Open : it just shows the text of the .idl text file Project , Add to project : It just (acts like) it adds a .idl text file to the project Component , Install component , Import a Type Library , Add : But it causes a handled crash Component , Install component , Import ActiveX Control , Add : But it causes a handled crash using Embarcadero's

Delphi - Unable to save/load TObjectList to FileStream

微笑、不失礼 提交于 2019-12-11 12:27:10
问题 I have a TObjectList, which I am trying to write to disk. Although I end up with a file (54 bytes), when I change the FNAME property value to something really long, the size of the file never changes, and I get nil when I try to read it. I am at a loss as to what is wrong. Sorry for the long code snippet. it is easy to understand what is going on, just I can't figure out why it's not doing what I want. type { Declare a new object type. } TNewObject = class(TComponent) private FName: String;

Scrolling Programmatically THorzScrollBox Firemonkey XE6

不羁岁月 提交于 2019-12-11 11:48:10
问题 I have a THorzScrollBox in a form, and some TStyledControls inside. Each StyledControl has a Tag to identify. Using an TEdit to inform a value, I can find inside the ScrollBox an specific Control by his tag . If the control that I searched is not on the screen, I want to scroll the ScrollBox to show it. How can I do this programmatically? 回答1: I found a way to do this. I have to use ScrollBy . But the detail is that if I want to scroll the controls to right I have to use a negative value.

BinarySearch for all occurrences?

空扰寡人 提交于 2019-12-11 11:15:12
问题 How can I search for all occurrences of a value in an array using BinarySearch ? The default TArray.BinarySearch in System.Generics.Collections only returns one index. Example Array: A = [1, 2, 3, 3, 3, 6, 7, 8, 9]; 回答1: A binary search assumes you already have your array sorted, so any other matching elements would be clustered around the matching element returned by BinarySearch . The Delphi XE5 helps notes that If there is more than one element in the array equal to Item, the index of the

How to remove empty/nil elements from Array?

心不动则不痛 提交于 2019-12-11 11:12:51
问题 How can I remove empty elements or elements with nil pointers from an Array? A generic solution would be welcome. 回答1: You could write it like this: type TArrayHelper = class class function RemoveAll<T>(var Values: TArray<T>; const Value: T); static; end; .... function TArrayHelper.RemoveAll<T>(var Values: TArray<T>; const Value: T); var Index, Count: Integer; DefaultComparer: IEqualityComparer<T>; begin // obtain an equality comparer for our type T DefaultComparer := TEqualityComparer<T>

DataSnap and the autoinc field

假如想象 提交于 2019-12-11 08:09:15
问题 I would like my table to have the autoinc field but doing an insert on it using ClientDataSet causes 'field must have value' error. It seems Datasnap server does not know it should generate one by itself and expects a value. For the demo I created a simple table with only 2 fields : ID (autoinc) and DATE (varchar). The database is SQLite. procedure TForm3.Button1Click(Sender: TObject); begin ClientDataSet1.Insert; ClientDataSet1.FieldByName('DATE').Value:= DateUtils.DateOf(PlannerCalendar1