Questions tagged [delphi-10.2-tokyo]

Delphi 10.2 Tokyo is a specific version of Delphi released in March 2017.

Delphi 10.2 Tokyo supports development of applications covering 32-bit and 64-bit, 32-bit, server 64-bit, 32-bit and 64-bit, and 32-bit. Windows applications may be built using either the framework or the (FMX) framework, whereas the Mac and mobile platforms are built under the Firemonkey framework only.

Always use the tag alongside this tag.

References

540 questions
22
votes
1 answer

StrToFloat fails to report invalid floating point numbers in Delphi 64bits

The following code which attempts to convert a value well beyond the double precision range StrToFloat('1e99999999') correctly reports an incorrect floating point value in Delphi 10.2r3 with the Windows 32 bits compiler, but when compiled with the…
Eric Grange
  • 5,591
  • 1
  • 35
  • 55
18
votes
2 answers

Is delphi TQueue buggy? Using TQueue return nil with dequeue

I don't understand why this very simple code failed? I'm on Delphi Tokyo release 2. {$APPTYPE CONSOLE} uses System.SysUtils, System.Generics.Collections; procedure Main; var aQueue: TQueue; aBytes: TBytes; begin aQueue :=…
vostock
  • 229
  • 1
  • 7
15
votes
1 answer

Why the exception is not caught by the try... except end;?

I have this code (that runs under iOS with Delphi Tokyo): procedure TMainForm.Button1Click(Sender: TObject); var aData: NSData; begin try try aData := nil; finally // this line triggers an exception …
zeus
  • 9,795
  • 5
  • 45
  • 112
13
votes
1 answer

H2077 inside try finally block with goto - is it Tokyo's compiler defect?

After upgrading to 10.2 Tokyo one of third-party components started throwing a lot of exceptions. Debugging showed problematic part of code, that can be represented by this (hopefully) minimal code: function foo(i: Integer): Boolean; label…
BrakNicku
  • 5,634
  • 3
  • 18
  • 35
13
votes
2 answers

Delphi - Recompiling application with 10.2.1 causes memory leaks?

I just installed Delphi 10.2 Release 1. When I recompiled my applications and ran them, I get a lot of memory leaks. I had no memory leaks with 10.2 (without the update). I made no changes to the code either. To verify, I created a simple blank…
Rohit
  • 839
  • 1
  • 9
  • 19
11
votes
1 answer

Delphi 10.3 Rio reduced the number of Android devices supported?

My Delphi 10.2.3 app was submitted to Google Play with the fix from this answer: Delphi Android app API level 26? Google Play reported that this build supports over 400 devices. The same project was built with 10.3 Rio but when it was submitted,…
Mike at Bookup
  • 998
  • 10
  • 20
10
votes
1 answer

Nested generic record

I just faced a strange compiler error when trying to define nested generic record. Nesting works fine with classes and interfaces, but not with records somehow. type TRec = record Value: T; end; TCls = class public Rec:…
Z.B.
  • 1,070
  • 9
  • 17
9
votes
1 answer

Firemonkey android read_phone_state runtime permission asks to get IMEI

How can I get read_phone_state permission at runtime to get IMEI number? if not HasPermission('android.permission.READ_PHONE_STATE') then begin //ASK AND GET PERMISSION ? end; function TForm1.HasPermission(const Permission:…
Dejan
  • 1,589
  • 1
  • 15
  • 28
9
votes
1 answer

Delphi interface not reference counted

Reading the Expert Delphi book I have found something that I cannot understand. The author has created an unit with this code: IToDoData = interface //CRUD function ToDoCreate(aValue: TToDo): integer; function ToDoRead(id: integer; out…
Emma Rossignoli
  • 835
  • 6
  • 18
8
votes
2 answers

How to compare sets of enumerated types

From a certain point I got tired of writing set conditions (and, or), because for more conditions or longer variable names it begins to be clumsy and annoying to write all over again. So I started writing helpers so I could write…
Triber
  • 1,405
  • 2
  • 19
  • 31
8
votes
2 answers

Parameter.AsString failing under Oracle/MSSQL - Parameter.Value 2-byte chars under Oracle

After changing to FireDAC I have trouble getting this code to work on MSSQL/Oracle: with DataFormsettings do begin Close; if Params.Count=0 then FetchParams; Params.ParamByName('TT_EMP_ID').Asinteger := AEmpID; …
Jan Doggen
  • 8,154
  • 13
  • 56
  • 117
7
votes
3 answers

When I perform the OnDblClick event (Form1) to open Form2, it fires the OnCellClick event of Form2, without having clicked on the form2 grid

Event form 1: procedure TForm1.Panel1DblClick(Sender: TObject); begin TForm2.Create(Self).ShowModal; end; Event form 2: procedure TForm2.DBGrid1CellClick(Column: TColumn); begin ShowMessage('Test'); end; What should I do to avoid fom2's…
7
votes
2 answers

Delphi code completion fail with anonymous methods

Please create a new FMX application, add a button and a memo to run this example. I have this code: procedure TForm1.Button1Click(Sender: TObject); begin TTask.Run(procedure var client: TIdHTTP; result:…
Rosanna Trevisan
  • 392
  • 2
  • 15
7
votes
3 answers

Delphi 10.2.3 hangs when starting (with debugging) a 32 bit application

Update: as noted by some, this is a problem brought about by NOD32. An issue item for this in their system is: https://forum.eset.com/topic/16237-probleme-debug-delphi-with-eset-11249/ Delphi 10.2.1 and 10.2.3 hang when starting (with debugging)…
X-Ray
  • 2,724
  • 1
  • 32
  • 63
7
votes
1 answer

Strange behaviour of TypeInfo by anonymous methods

For a piece of code that needs the type "family" of a generic type, I try to use the TypeInfo to retrieve the required information. class function GetTypeKind:TTypeKind; For most types I can figure this out. But the anonymous method type behaves…
Toon Krijthe
  • 50,865
  • 37
  • 137
  • 200
1
2 3
35 36