DonSa
Members-
Content Count
12 -
Joined
-
Last visited
Everything posted by DonSa
-
Controls auto fill duplicating characters when input unicode text in firemonkey ios apps.
DonSa posted a topic in FMX
Has anyone had this problem like me? TEdit, TMemo, and other controls auto fill duplicating characters when input unicode text in firemonkey ios apps. I have tried to input Vietnamese text: 1. I created a simple firemonkey ios app with TEdit control, with name as Edit1 2. It run OK on iphone 14, ios 16.4 3. Input an unicode text: "tà tà" into Edit1 (a Vietnamese word) 4. Duplicating character and show on Edit1: "ttaà ttaà" -
I have a problem with delphi ios controls that i do not know why?! I have created a simple project on Delphi 11.2 and (test run Delphi 11.3) with some controls: TTabControl, TEdit, TCombobox, TMemo, TButton... 1. When i run this project on iPhone 11 device with iOS 16 then everything is OK 2. However, when i run this project on iPhone 14 device with iOS 16, then controls have not show on the form (I have attached two screen images of this sample) My Mac: MacBook Pro 2020, Intel Core i7, Moneterey OS, XCode 14 Please help me, thanks!
- 12 replies
-
Thank you for your information. I have many users from Vietnam who use my apps. They usually set the default language as Vietnamese. With this issue, they cannot open the app. If they switch the default language to English or another language, then apps run OK.
- 12 replies
-
This problem seems to be struggling. The same request is open as of April 2021 on RAD Embarcadero Quality (RSP-33610) but remains unresolved. Is there a temporary solution to this problem?
- 12 replies
-
Callback a javasctipt on Webbrowser in Firemokey for both Android and iOS
DonSa posted a topic in FMX
I have a sample code to callback from TWebbrowser, for example: get a selected text on webbrowser... It is OK in Firemonkey Android. But in Firemonkey iOS, there is error at line: "FJavaScriptValueCallback := TJavaScriptValueCallback.Create;" with message: Incompatibe types TJavaScriptValueCallback and TWKScriptMessage. I don't know in iOS, what object evaqulient with class that i ahve decalred in Android: TJavaScriptValueCallback = class(TJavalocal, JValueCallBack) Please give idea! Thanks! This is my code: unit uMain; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Objects, FMX.TabControl, FMX.WebBrowser, System.IOUtils, FMX.Controls.Presentation, FMX.Edit, FMX.Memo.Types, FMX.ScrollBox, FMX.Memo, FMX.StdCtrls, System.JSON, System.Actions, FMX.ActnList, FMX.ListView.Types, FMX.ListView.Appearances, FMX.ListView.Adapters.Base, FMX.ListView, System.StrUtils, FMX.ListBox, FMX.Layouts, FMX.MultiView, System.RegularExpressions, FMX.Platform, FMX.Clipboard {$IFDEF ANDROID} , Androidapi.JNIBridge, Androidapi.JNI.WebKit, Androidapi.JNI.JavaTypes, FMX.StdActns, FMX.MediaLibrary.Actions, System.ImageList, FMX.ImgList {$ENDIF} {$IFDEF IOS} , iOSapi.WebKit, iOSapi.Foundation, Macapi.Helpers, iOSapi.Helpers, iOSapi.UIKit, System.ImageList, FMX.ImgList, FMX.StdActns, FMX.MediaLibrary.Actions {$ENDIF}; type TJavaScriptResultEvent = procedure(Sender: TObject; const JavaScriptResult: string) of object; {$IFDEF ANDROID} TJavaScriptValueCallback = class(TJavalocal, JValueCallBack) {$ENDIF} {$IFDEF IOS} TJavaScriptValueCallback = class(TWKScriptMessage) {$ENDIF} private FOnResult: TJavaScriptResultEvent; public {$IFDEF ANDROID} { JValueCallback } procedure onReceiveValue(value:JObject); cdecl; {$ENDIF} {$IFDEF IOS} { TWKScriptMessage } procedure onReceiveValue(controller: WKUserContentController; message: WKScriptMessage); {$ENDIF} property OnResult: TJavaScriptResultEvent read FOnResult write FOnResult; end; TfrmMain = class(TForm) private { Private declarations } FJavaScriptValueCallback: TJavaScriptValueCallback; public { Public declarations } constructor Create(AOwner: TComponent); override; destructor Destroy; override; end; var frmMain: TfrmMain; implementation {$R *.fmx} { TJavaScriptValueCallback } {$IFDEF ANDROID} procedure TJavaScriptValueCallback.onReceiveValue(value: JObject); begin if Assigned(FOnResult) then FOnResult(Self, JStringToString(TJString.Wrap(value)).DeQuotedString('"')); end; {$ENDIF} {$IFDEF IOS} procedure TJavaScriptValueCallback.onReceiveValue(controller: WKUserContentController; message: WKScriptMessage); var MessageText: string; begin if Assigned(FOnResult) then begin if Assigned(message.body) then begin MessageText := NSStrToStr(TNSString.Wrap(message.body)); FOnResult(Self, MessageText); end; end; end; constructor TfrmMain.Create(AOwner: TComponent); begin inherited; FJavaScriptValueCallback := TJavaScriptValueCallback.Create; end; destructor TfrmMain.Destroy; begin FJavaScriptValueCallback.Free; inherited; end; {$ENDIF} end. -
Callback a javasctipt on Webbrowser in Firemokey for both Android and iOS
DonSa replied to DonSa's topic in FMX
thank Dave Nottage and Rollo62. It was ok for both iOS and Android -
I created an application and put a listview to blank form. 1. With iPhone language is English, everything is ok: 1.1 Default ListView: 1.2 Customized Textcolor of item: 2. With iPhone language is Vietnamese, this sample has problem: 2.1. Default Listview: This app still run with incorrect controls 2.2 Customized listview (in design time) This app crashed when lauching... my simple code: Thanks!
- 12 replies
-
I have changed my iOS device language to English, French, Deustch and many others then my app run still ok on both iPhone 11 and iPhone 14. This error orccur when iOS language is Vietnamese. More information: With simple controls such as: TButton, TText, TMemo iOS app still run with blank form or incorrect showing, however, if I put a TListView with customized listview item on form then iOS app crashed when launching. Thanks!
- 12 replies
-
I have opened an issue on https://quality.embarcadero.com (ID issue is RSP-41209) and wait... Thank you!
- 12 replies
-
I have reconigzed that, if iphone language is English then iOS app run ok, but if language setting is Vietnamese then iOS app crashed when launching. However, i don't know fix this. please help me
- 12 replies
-
I am using Delphi 11.2, XCode 13.4, iOS 15.5, Monterey MacOS. I try to build a mobile sample project on IPhone 7 Plus with iOS 15.5 is OK However, when I build this app on Iphone 11 Pro with iOS 15.5 is not OK. There are many controls such as: TabControl, Button, ListBox...that are not showing on a white form. I do not know why?! Please help me! Thanks
-
When i try to put a TRectangle component to form (I can not "Edit Default Style" of TRectangle) then TRectangle showed with default properties. So, I am thinking there is problem in "Default Style" of Delphi 11.2 for iOS on iphone 11, 12, 13, 14 devices (I have tested on iPhone 11, 14) Help me please! Thank you!