delphi-10-seattle

how to store data on Firebase - Delphi XE 10

蹲街弑〆低调 提交于 2019-11-29 21:46:28
问题 What is the best way to connect to Google´s Firebase DBaaS from Embarcadero Delphi XE 10 ? I am not sure how to do it from AnyDAC. Or if exists a component out there (i coundnt find one on search) Any help? thank you 回答1: Firebase was acquired by Google and now makes available many tools and features (Cloud Messaging, Authentication, Realtime Database, Storage, Hosting etc...) If you are looking for a service that store and sync app data in realtime, the Realtime Database it's for you.

Why can't I assign my function reference to a matching variable? E2555 is raised

匆匆过客 提交于 2019-11-29 17:04:07
问题 I'm trying to build an custom comparer which allows the assignment of the comparison function to an internal field. In order to ease the creation of the comparer, I tried to add a constructor-like class function Construct which initializes the comparer. Now if I try to compile the following example, the compiler displays [dcc32 Fehler] ConsoleDemo1.dpr(37): E2555 Symbol 'Result' cannot be tracked I have the following example-code: program ConsoleDemo1; {$APPTYPE CONSOLE} {$R *.res} uses

Getting type of record field with RTTI fails for static arrays

假装没事ソ 提交于 2019-11-29 10:36:59
I am trying to get types for record fields in order to create correct comparer (as general solution for any/almost any record type). I can't find type information for static arrays: TArrFieldTest = record a: string; b: array[0..3] of byte; end; procedure Test; var rttiContext: TRttiContext; rttiType: TRttiType; rttiFields: TArray<TRttiField>; begin rttiType := rttiContext.GetType(TypeInfo(TArrFieldTest)); rttiFields := rttiType.GetFields; Assert(rttiFields[0].FieldType<>nil); // it's ok Assert(rttiFields[1].FieldType<>nil); // fail here! end; FieldType is nil for static array of any type. Any

Delphi android application is raising issue in Lennova A5000 mobile

旧城冷巷雨未停 提交于 2019-11-29 07:56:14
I'm using Delphi 10 Seattle trail version for developing mobile application. And I tried to create new android mobile application which contains only TEditBox. And then compiled by setting the option as "Release". Then, generated the .apk file and then provided the file to the user. And when the user tried to click the edit box, the application raises the error message that " The Appname is not responding ". The user is using the Lennova A5000 and the Os is Android 5.0.2. And the same application is running in my Moto g2 (5.0.2) and Micromax Yureka. Please provide me is there any solution.

Create a button that accepts .PNG images as Glyph

一世执手 提交于 2019-11-29 07:51:44
I'm trying to understand how the SpeedButton Glyph property work, I find that the field declared as: FGlyph: TObject; While the property as: property Glyph: TBitmap read GetGlyph write SetGlyph stored HasCustomGlyph; That put me in a way where I can't understand that code even if I read it line by line, when I was trying to create my own SpeedButton that accepts .PNG images too instead of .bmp images only. For the first time I was thinking to declare the property as TPicture instead of TBitmap . Is there any way to create MySpeedButton with Glyph : TPicture ? What I try is below: TMyButton =

Getting type of record field with RTTI fails for static arrays

巧了我就是萌 提交于 2019-11-28 03:50:05
问题 I am trying to get types for record fields in order to create correct comparer (as general solution for any/almost any record type). I can't find type information for static arrays: TArrFieldTest = record a: string; b: array[0..3] of byte; end; procedure Test; var rttiContext: TRttiContext; rttiType: TRttiType; rttiFields: TArray<TRttiField>; begin rttiType := rttiContext.GetType(TypeInfo(TArrFieldTest)); rttiFields := rttiType.GetFields; Assert(rttiFields[0].FieldType<>nil); // it's ok

Create a button that accepts .PNG images as Glyph

情到浓时终转凉″ 提交于 2019-11-28 01:44:25
问题 I'm trying to understand how the SpeedButton Glyph property work, I find that the field declared as: FGlyph: TObject; While the property as: property Glyph: TBitmap read GetGlyph write SetGlyph stored HasCustomGlyph; That put me in a way where I can't understand that code even if I read it line by line, when I was trying to create my own SpeedButton that accepts .PNG images too instead of .bmp images only. For the first time I was thinking to declare the property as TPicture instead of

How to get device email address in Delphi 10

放肆的年华 提交于 2019-11-28 00:36:36
I'm trying to get my device email address, I used Java2OP to convert AccountManager class to object pascal. However, I tried to get the email address using the following code: jAm: JAccountManager; accounts: TJavaObjectArray<JAccountClass>; jAcc: JAccountClass; begin jAM := TJAccountManager.JavaClass.get(SharedActivityContext); accounts := TJavaObjectArray<JAccountClass>.Wrap(jAM.getAccountsByType(StringToJString('com.google'))); mmLog.Lines.Add('Length Accounts: ' + Inttostr(accounts.Length)); if accounts.Length > 0 then begin jAcc := accounts.Items[0]; mmLog.Lines.Add(jstringtostring( jAcc

How to get device email address in Delphi 10

女生的网名这么多〃 提交于 2019-11-26 23:26:25
问题 I'm trying to get my device email address, I used Java2OP to convert AccountManager class to object pascal. However, I tried to get the email address using the following code: jAm: JAccountManager; accounts: TJavaObjectArray<JAccountClass>; jAcc: JAccountClass; begin jAM := TJAccountManager.JavaClass.get(SharedActivityContext); accounts := TJavaObjectArray<JAccountClass>.Wrap(jAM.getAccountsByType(StringToJString('com.google'))); mmLog.Lines.Add('Length Accounts: ' + Inttostr(accounts.Length)