Delphi

View content ot TRESTRequest before sending?

余生颓废 提交于 2021-02-11 12:32:09
问题 So if I have prepared a REST Request, is there a way that I can view the output of it before sending for debugging purposes? So: LRequest.Client := LClient; LRequest.Method := rmPOST; LRequest.Resource := AUTH_PATH; LRequest.Accept := 'application/json'; // required parameters LRequest.AddParameter(ExCode, AuthCode, pkGETorPOST); LRequest.AddParameter(ExRedirectURI, RedirectionEndPoint, pkGETorPOST); LRequest.AddParameter(ExGrantType, ExAuthorizationCode, pkGETorPOST); LRequest.AddParameter(

How to work with records using file stream I/O instead of the 'old' I/O

好久不见. 提交于 2021-02-11 12:03:05
问题 Never learnt to work with streams for reading / writing data, instead I'm using the old Pascal way. Now everybody says this is not efficient and I would like to learn the file stream way, but can't really work with the tutorials that are available. I am using Excel to create and manage datasets (big data tables with one or two headers). I save these as *.txt files (tab delimited). These files I read with Delphi to fill my records and arrays, etc. Below a simplified code example of what I am

How to use 3rd party framework depends from dylib for IOS in Delphi Firemonkey

荒凉一梦 提交于 2021-02-11 07:16:51
问题 I'm using 3rd-party SDK, presented as libXXX.a, that needs libstdc++.dylib libz.dylib 15/05/2017 ANSWER. Finally I have found a time to write down my solution. If your 3rd party SDK depends from some dynamic libraries, do this: For example dynamic library is called as "libSuperLibrary.dylib". For example 3rd party SDK is called as "SuperFramework.framework". Go to "Project - Options - Delphi Compilier - Framework Search Path" Fill the field by path to your framework like "C:\path\to\my

Custom grid in firemonkey

孤街醉人 提交于 2021-02-11 07:10:40
问题 We are merging current vcl applications to Firemonkey. The current biggest issue is to create a tgrid with some custom columns. I need a column with a combobox cells as well as a column with multiple check boxes in each cell. 回答1: Take a look at my post http://monkeystyler.com/blog/entry/firemonkey-grid-basics-custom-cells-and-columns which explains the basics of FireMonkey grids and how to create custom columns. And here's another post which uses generics to create a column for any component

Custom grid in firemonkey

戏子无情 提交于 2021-02-11 07:07:11
问题 We are merging current vcl applications to Firemonkey. The current biggest issue is to create a tgrid with some custom columns. I need a column with a combobox cells as well as a column with multiple check boxes in each cell. 回答1: Take a look at my post http://monkeystyler.com/blog/entry/firemonkey-grid-basics-custom-cells-and-columns which explains the basics of FireMonkey grids and how to create custom columns. And here's another post which uses generics to create a column for any component

Base64 decode fails with “No mapping for the Unicode character exists in the target multi-byte code page.”

ぐ巨炮叔叔 提交于 2021-02-11 06:51:32
问题 I am trying to create the signature string needed for Azure Storage Tables as described here: https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key#encoding-the-signature The Access key is "p1qPD2lBiMlDtl/Vb/T/Xt5ysd/ZXNg5AGrwJvtrUbyqiAQxGabWkR9NmKWb8Jhd6ZIyBd9HA3kCRHr6eveKaA==" The failing code is: property AccessKey: string read FAccessKey write SetAccessKey; function TAzureStorageAPI.GetAuthHeader(StringToSign: UTF8String): UTF8String; var AccessKey64: string;

Remove Android app border with FireMonkey

て烟熏妆下的殇ゞ 提交于 2021-02-11 06:22:57
问题 I create an Android app with FireMonkey (10.2.2), but I don't understand why I have a top and right white border. I never added that to my app. I started to create an example app, just a black form with a black TRectangle without sides. I don't have to code anything, just design. When I compile for Windows, it's OK. I have this border only on Android. I get this result: You can download the example project here : Click Here to Download 回答1: I was having the exact same problem when adding a

“Row cannot be located for updating” error [another]

流过昼夜 提交于 2021-02-10 20:22:57
问题 I'm working with Delphi (XE3) and need to connect to a MySQL database. I'm having a strange problem that seems quite common but I still haven't entirely solved this problem. traditional solutions include: setting "Update Criteria" to adCriteriaKey. ensure your table has a primary key (and tell the ADO Table about it) problem 1: start the application, execute the code: if the new value happens to match what's already in the database, I get the error at position "B". problem 2: start the

“Row cannot be located for updating” error [another]

感情迁移 提交于 2021-02-10 20:21:52
问题 I'm working with Delphi (XE3) and need to connect to a MySQL database. I'm having a strange problem that seems quite common but I still haven't entirely solved this problem. traditional solutions include: setting "Update Criteria" to adCriteriaKey. ensure your table has a primary key (and tell the ADO Table about it) problem 1: start the application, execute the code: if the new value happens to match what's already in the database, I get the error at position "B". problem 2: start the

Accessing hidden method MotionEvent->init on Dark greylist

孤人 提交于 2021-02-10 19:36:32
问题 I am programming an Android App in Delphi Firemonkey, when i click on the screen and tab out of the app, i get this error in Logcat: Accessing hidden method Landroid/view/MotionEvent;-><init>()V (dark greylist, JNI) And this Popup text: Detected Problems with API compatibility (visit g.co/appcompat for more info) I am using Delphi 10.3 来源: https://stackoverflow.com/questions/56427997/accessing-hidden-method-motionevent-init-on-dark-greylist