Delphi

Accessing hidden method MotionEvent->init on Dark greylist

佐手、 提交于 2021-02-10 19:33:44
问题 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

Accessing hidden method MotionEvent->init on Dark greylist

独自空忆成欢 提交于 2021-02-10 19:33:23
问题 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

Unspecified certificate from client when using TRESTRequest

前提是你 提交于 2021-02-10 18:15:25
问题 When calling one of our Internal servers with SSL URL, TRESTClient and TRESTRequest gives and error first from Exception Class ENetHTTPCertificateException and then from ERESTException with the message 'Unspecified certificate from client' I know that WinInet Api is being used behind, but here is no native way in the Delphi Rest Library to set the connection to Ignore Certificate Errors - How can I code that ? or Does this mean the server is requesting a client certificate ? function

delphi ITaskFolder.RegisterTaskDefinition not working

微笑、不失礼 提交于 2021-02-10 15:49:37
问题 I'm trying to create a task to windows task scheduler. Here's the code. procedure TForm1.Button1Click(Sender: TObject); var ts: ITaskService; tf: ITaskFolder; tf2: ITaskFolder; td: ITaskDefinition; tr: ITrigger; tt: ITimeTrigger; at: IAction; ae: IExecAction; rt: IRegisteredTask; begin CoInitializeEx(nil, COINIT_MULTITHREADED); CoCreateInstance(CLSID_TaskScheduler,nil,CLSCTX_INPROC_SERVER,IID_ITaskService,ts); ts.Connect(unassigned, unassigned, unassigned, unassigned); try tf := ts.GetFolder(

delphi ITaskFolder.RegisterTaskDefinition not working

笑着哭i 提交于 2021-02-10 15:48:27
问题 I'm trying to create a task to windows task scheduler. Here's the code. procedure TForm1.Button1Click(Sender: TObject); var ts: ITaskService; tf: ITaskFolder; tf2: ITaskFolder; td: ITaskDefinition; tr: ITrigger; tt: ITimeTrigger; at: IAction; ae: IExecAction; rt: IRegisteredTask; begin CoInitializeEx(nil, COINIT_MULTITHREADED); CoCreateInstance(CLSID_TaskScheduler,nil,CLSCTX_INPROC_SERVER,IID_ITaskService,ts); ts.Connect(unassigned, unassigned, unassigned, unassigned); try tf := ts.GetFolder(

TRESTRequest: Is it possible to use custom media types in a POST request?

蹲街弑〆低调 提交于 2021-02-10 12:25:35
问题 We have an API that expects our own vendor specific content type for example application/vnd.xxxx.custom.custom-data+json but looking through the source code of REST.Client it seems to always default to one of the ContentTypes in REST.Types for example when assigning ctNone in my body request it will default to ctAPPLICATION_X_WWW_FORM_URLENCODED . I've tried assigning the content type directly to the TRESTClient.ContentType property but that gets overwritten by the TRESTRequest.ContentType

TRESTRequest: Is it possible to use custom media types in a POST request?

▼魔方 西西 提交于 2021-02-10 12:25:06
问题 We have an API that expects our own vendor specific content type for example application/vnd.xxxx.custom.custom-data+json but looking through the source code of REST.Client it seems to always default to one of the ContentTypes in REST.Types for example when assigning ctNone in my body request it will default to ctAPPLICATION_X_WWW_FORM_URLENCODED . I've tried assigning the content type directly to the TRESTClient.ContentType property but that gets overwritten by the TRESTRequest.ContentType

How to add/insert a xml node into text

痞子三分冷 提交于 2021-02-10 11:55:36
问题 I am generating a text document in the open document format (odt) which is based on XML. But I have a problem when adding a tabulator in a text passage. When I create it in the Open Office application and save the document the passage has the internal XML representation as: <text:p text:style-name="P5">Prepared by: <text:tab/>Tim Test</text:p> When generating it automatically I come to this part in my source code: Node, Node1: IXMLNode; ... Node := Node1.AddChild('text:p'); Node.Attributes[

Loaded procedure executed twice for TFrame's descendant

穿精又带淫゛_ 提交于 2021-02-10 08:10:59
问题 I've registered as component a TFrame 's descendant class and I've noticed that the Loaded procedure is executed twice: Runtime: TMyFrame = class(TFrame) private protected procedure Loaded(); override; public constructor Create(AOwner : TComponent); override; end; constructor TMyFrame.Create(AOwner : TComponent); begin ShowMessage('Before TMyFrame.Create'); inherited Create(AOwner); ShowMessage('After TMyFrame.Create'); end; procedure TMyFrame.Loaded(); begin ShowMessage('Before TMyFrame