delphi-xe4

Opening URL within ios application

泪湿孤枕 提交于 2019-12-18 08:46:32
问题 I need to open a webpage with safari in my iOS application. With XE2 there was iphoneall unit, which exposed UIApplication. XE4 doesn't use FPC anymore, so I can't use that. Embarcadero documentation says I can use SDKs only with C++ or using delphi interfaces (and still, macapi is for OSX only, not iOS). So, it seems that there is no interface for UIKit framework?! Another solution I tried was: _system('open http://www.google.com'); But that had no affect at all! Is there any other ways to

Delphi XE4 iOS can't connect to PAServer [closed]

有些话、适合烂在心里 提交于 2019-12-17 19:53:13
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I have the PAServer running on my MacBook without password. From my Windows/Delphi I then try setup the connection. I enter IP address and empty password. However, when testing the connection, I get error:

delphi - coloring cxdbgrid field depending on its content

巧了我就是萌 提交于 2019-12-14 02:48:34
问题 I am not exactly sure how to put this. I am coloring cxDB grid field based on the value: procedure TForm1.cxGrid1DBTableView1StylesGetContentStyle( Sender: TcxCustomGridTableView; ARecord: TcxCustomGridRecord; AItem: TcxCustomGridTableItem; var AStyle: TcxStyle); var AColumn: TcxCustomGridTableItem; begin AColumn := (Sender as TcxGridDBTableView).GetColumnByFieldName('SIFRA'); if VarToStr(ARecord.Values[AColumn.Index]) = '007 01' then AStyle := cxstyle1; end; I would like to change the code

Can Delphi XE4 support iOS 4.x?

房东的猫 提交于 2019-12-13 15:42:54
问题 Looking at the official "supported" iOS versions, I believe 5.x and 6.x are supported. I know it is a long shot, but is there any way to get iOS 4.x support? 回答1: I can't say for certain, but I would guess that it is not likely, or they would probably have done it in the initial release. Now they are moving on and focusing on Android, so iOS is not the focus right now, at least as far as supporting older versions is concerned. 来源: https://stackoverflow.com/questions/18090790/can-delphi-xe4

Decode file to stream, from base64 encoded string. How to do that?

蓝咒 提交于 2019-12-13 03:38:11
问题 I have a string, recived by my app from web-browser. String contains PNG image, and encoded to base64. It isn't my stupid idea, convert image to base64 string )) That doing web-broser. HTML5 canvas object doing that, when need to send image to somewhere. So, how to decode this string to image? In Delphi I written my web-server, that recives data. In PHP this can be solved like that: function base64_to_jpeg( $base64_string, $output_file ) { $ifp = fopen( $output_file, "wb" ); fwrite( $ifp,

Delphi XE4 iOS open email program not working

风格不统一 提交于 2019-12-12 23:02:09
问题 I am testing the following code on an iPhone4 (without sim card, but I don't see how that can matter since its mail program is otherwise working fine): The SharedApplication and canOpenURL etc. are all routines provided by XE4. procedure TFormMain.sbContactsDetailsEmailClick(Sender: TObject); var S: string; NSU: NSUrl; begin // URL.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding); S := 'mailto:' + 'info@example.com' + '?subject=' + 'title' + '&body='; NSU := StringToNSUrl(S);

TwebBrowser Zoom/Gesture is not working for firemonkey/iOs in XE4 when open a pdf file

故事扮演 提交于 2019-12-12 14:05:07
问题 I want to display PDF within iOS application, so far the only way I find is open it in TwebBrowser. A.It is displaying in "fit to page width" zoom as default B.There is no "zoom" function WebBrowser1.Navigate(file://mypdf.pdf') How to I want to change the zoom after open the file (My solution encounter q#2) Make the zoom work (My solution encounter q#3) Make the gesture as work just like web page For #1: I chagne WebBrowser1.height/width in run-time, it will auto scale(zoom?) as "Fit to width

Fluent interface with inheritance in Delphi

自作多情 提交于 2019-12-12 11:15:16
问题 I have following fluent interface declaration and class that implements that interface: type IDocWriter = interface ['{8CB5799A-14B1-4287-92FD-41561B237560}'] function Open: IDocWriter; function Close: IDocWriter; function Add(const s: string): IDocWriter; function SaveToStream(Stream: TStream): IDocWriter; end; TDocWriter = class(TInterfacedObject, IDocWriter) public function Open: IDocWriter; function Close: IDocWriter; function Add(const s: string): IDocWriter; function SaveToStream(Stream

Delphi - How can I pass Generic parameter to function that accept Array of const parameter

本小妞迷上赌 提交于 2019-12-12 11:05:47
问题 I have a 'Base class' which contain a 'function' that accept parameter of type 'Array of const' as shown below:- type TBaseClass = class(TObject) public procedure NotifyAll(const AParams: array of const); end; procedure TBaseClass.NotifyAll(const AParams: array of const); begin // do something end; I have another 'Generic class' that is derived from the 'base class' ( defined above ) type TEventMulticaster<T> = class(TBaseClass) public procedure Notify(AUser: T); reintroduce; end; procedure

Using ParseSQL Command for ADO Parameters Cause Invalid Parameter DataType

懵懂的女人 提交于 2019-12-12 08:59:21
问题 I have some SQL Command that contains a parameter such:(Note that myID has "int" type in SQL) vSqlString :='Select * From myTable Where myID= :paramID'; and Use ParseSQL Command to execute this command: myADOQuery.Parameters.ParseSQL(vSqlString , True); Now myADOQuery.Parameters.ParamByName('paramID').DataType is smallint Type and it can't accept negative integer values. I can exactly show to compiler that my Parameter[0].DataType is ftIneteger and it works properly, but what is a good