delphi-xe5

Can I use Objective C codes with Delphi XE5

随声附和 提交于 2019-12-12 02:39:14
问题 I am trying to write an ios program wiht Delphi XE5. You know there are bunch of ready to use Objective C codes to accomplish a lot of things. I am just wondering if it is possible to use those Objective C codes under Delphi XE5. Like we use Assembly codes between code line blocks asm // ... end; can we say ObjectiveC My Objective C code end; thanks in advance 回答1: The mobile Delphi compiler compiles Object Pascal only. What you can do is to compile the Obj-C code to object files and link

Typecast Generic type to other type

只愿长相守 提交于 2019-12-12 00:52:14
问题 i have a base class TEventMulticaster = class(Tobject) public procedure Notify(aMap: WideString); end; procedure TEventMulticaster.Notify(aMap: WideString); begin // Do something end; And a derived generic class TEventMulticaster<T> = class(TEventMulticaster) public procedure Notify(aMap: T ); reintroduce; end; procedure TEventMulticaster<T>.Notify(aMap: T); begin inherited Notify(aMap) // ERROR end; when base class Notify is call it give me error "Incompatible types: 'WideString' and 'T'"

Send Intent to use default mail app in android [closed]

那年仲夏 提交于 2019-12-11 19:28:15
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago . Delphi XE5 (Android App). Doing a small app and just want to get some feedback . How can I send an intent to use a simple TEdit for Subject, and Tmemo for Message and send it to the default mail client on the end users phone. Thanks. 回答1: Something like this ought to help the process. Pass in the

how to connect to a MySQL server [closed]

老子叫甜甜 提交于 2019-12-11 18:47:31
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . First of all, I'm a complete novice when it comes to this procedure. I've been working on setting up a connection to my local SQL server I've set up using MySQL Workbench. I'm sure my SQL server is running, because I can set up an ODBC DataSource in Control Panel - Administrative

Can't open Https TSL page with Delphi - Indy Error : SSL23_GET_SERVER_HELLO

一曲冷凌霜 提交于 2019-12-11 14:59:59
问题 I want to read an HTML page via HTTPS using Indy's TIdHTTP in Delphi XE5. ssleay32.dll and libeay32.dll are in the main program folder. I am getting an error: SSL23_GET_SERVER_HELLO . What can I do to fix this? function get_page_text:string; var Response: String; HTTPClient: TidHTTP; const url = 'https://www.lustundreiz.com/login'; begin HTTPClient := TidHTTP.Create; HTTPClient.AllowCookies := True; HTTPClient.IOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil); Response := HTTPClient.get

How to use Unicode from Delphi in C++ DLL

半腔热情 提交于 2019-12-11 13:55:47
问题 How can I use a Unicode PWideChar in Delphi to call a C++ function in a DLL? I want to send a string from Delphi to C++ and modify it. function Test(a: PWideChar): Integer; cdecl; external 'c:\Win32Project1.dll' name 'Test'; extern "C" __declspec(dllexport) int __cdecl Test(char* a) { a = "汉语"; return 0; } 回答1: Typically the caller allocates a buffer which is passed to the callee, along with the buffer length. The callee then populates the buffer. size_t Test(wchar_t* buff, const size_t len)

PAClient Error: E2312 ERROR: resource directory '<project path>\res' does not exist

空扰寡人 提交于 2019-12-11 13:45:51
问题 If I make a new project and then try to run it, I get this error: [PAClient Error] Error: E2312 ERROR: resource directory '\res' does not exist I know that this error can be solved by defining icons in Project -> Options -> Application , but shouldn't Delphi have some icons defined by default? I get the same error on brand new installations on two machines. How do I fix this so I have some default icons defined for all projects I create? Edit: The Delphi XE5 install was done without any

How to adjust ListBox items height to fit the text in Firemonkey (android)?

大兔子大兔子 提交于 2019-12-11 13:29:41
问题 I'm using this code to add an item to a listbox, but I can't figure out how to dynamically resize the height of the item to fit the text: procedure TmForm.AddItemBtnClick(Sender: TObject); var Item: TListBoxItem; begin Item := TListBoxItem.Create(nil); Item.Parent := SomeListBox; Item.StyleLookup := 'listboxitemstyle'; Item.Text := 'Pe cararea lunga scurta se ducea un om venind, si-n tacerea lui ' + 'profunda se auzea borborosind. Cantr-o noapte intunecoasa soarel' + 'e lucea pe cer, iara eu

Use UIDocumentInteractionController in Delphi XE

别说谁变了你拦得住时间么 提交于 2019-12-11 09:03:00
问题 I have a Delphi XE5 app which downloads and stores PDFs locally on the device. I have a TWebBrowser on the form to view the PDFs and it works perfectly. I now wish to share the PDF with other applications (eg Safari, Mail, etc) but am really struggling! I have looked at the TShowShareAction action (on the Action List control) but this caters for a Bitmap (photo) to be shared. I have seen a lot of posts explaining that one should use UIDocumentInteractionController but I cannot find examples

The TEdit.Height is fixed on Firemonkey Style, How to change it?

久未见 提交于 2019-12-11 08:18:26
问题 I am using a regular Firemonkey HD application and decided to use only the style that comes with MetropolisUI (just the style, it is not Metropolis app/form since I need it to be cross platform) The problem is that TEdit is set to a fixed size, that is for me too big. I have played to change the style by StyleBook, was not successful. I am newbie with styles and firemonkey. Have tested other option incluing Chris Holliston using the interposer class. However I need to reduce the height at