Questions tagged [delphi-xe7]

Delphi XE7 is a specific version of Delphi released in September 2014.

Delphi XE7 is a specific version of Delphi released in September 2014. It supports development of applications covering Win32, Win64, OSX, iOS, and Android. Windows applications (32bit and 64bit) may be built using either the VCL framework or the Firemonkey (FMX) framework, whereas the rest of the supported platforms are built under the Firemonkey framework.

Always use the tag alongside this tag.

909 questions
145
votes
8 answers

EProgrammerNotFound exception in Delphi?

In Delphi 2009, SysUtils.pas contains this in line 425: EProgrammerNotFound = class(Exception); Is this simply an easter egg or something serious? When should this exception be raised? Does it also exist in Delphi Prism and/or Free Pascal? Q: Is…
mjn
  • 36,362
  • 28
  • 176
  • 378
25
votes
3 answers

Is Writeln capable of supporting Unicode?

Consider this program: {$APPTYPE CONSOLE} begin Writeln('АБВГДЕЖЅZЗИІКЛМНОПҀРСТȢѸФХѾЦЧШЩЪЫЬѢѤЮѦѪѨѬѠѺѮѰѲѴ'); end. The output on my console which uses the Consolas font is: ????????Z?????????????????????????????????????? The Windows console is…
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
21
votes
1 answer

What are the implications of using Canvas.TextOut?

Introduction My question comes from a rather interesting problem I have been dealing with for the past few days. I recently asked a question regarding Writing a custom property inspector - How to handle inplace editor focus when validating values? I…
Craig
  • 1,874
  • 13
  • 41
19
votes
2 answers

"No mapping for the Unicode character exists in the target multi-byte code page" error

I have a bug report showing an EEncodingError. The log points to TFile.AppendAllText. I call TFile.AppendAllText is this procedure of mine: procedure WriteToFile(CONST FileName: string; CONST uString: string; CONST WriteOp: WriteOpperation;…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
18
votes
1 answer

TJson.JsonToObject throws errors in a multi-thread environment

When using TJson.JsonToObject in a multi-thread environment random access violations occur. I was searching a long time for the problem and I could isolate it with the following code JSON class type TParameter = class public FName :…
deterministicFail
  • 1,271
  • 9
  • 28
17
votes
2 answers

Connect via Bluetooth with Delphi XE7 using portable printer

I'm trying to communicate with a Sewoo LK-P32 printer via Bluetooth. For this, I am using Delphi XE7. I made a few examples that come with Delphi and am not having success. I put the paired printer on tablet and even then I am not able to print…
17
votes
1 answer

Why are the Delphi zlib and zip libraries so slow under 64 bit?

Whilst benchmarking a real-world application I came across a surprising performance characteristic relating to the zlib and zip libraries that ship with Delphi. My real-world application exports .xlsx files. This file format is a collection of XML…
David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
16
votes
1 answer

Is it possible to have two properties with the same name?

Is it possible to have two properties with the same name? property Cell [Cl, Rw: Integer]: string read getCell write setCell; property Cell [ColName: string; Rw: Integer]: string read getCellByCol write setCellByCol; Well, I tried it and the…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
16
votes
1 answer

Why does this code fail when declaring TMemoryStream locally but works when globally declared?

The following function takes the selected text in a Richedit control, writes to a TMemoryStream inside a callback function and then returns as a plain text string the raw rtf code. var MS: TMemoryStream; // declared globally and…
Craig
  • 1,874
  • 13
  • 41
14
votes
1 answer

Why does TPath.HasValidPathChars accept '?' as a valid char in a path?

Why does System.IOUtils.TPath.HasValidPathChars accept'?' as a valid char in a path? I set the second parameter (UseWildcards) to false. So, according to the documentation the '?' should be rejected. Still, the function returns True for…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
14
votes
3 answers

TPopupMenu retains max width, even after Items.clear

How can you reset the max width for a PopupMenu's items list? Say i.e you add a few TMenuItems at runtime to a popupmenu: item1: [xxxxxxxxxxxxxxxxxxx] item2: [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx] The menu automatically adjusts the size to fit the…
hikari
  • 3,393
  • 1
  • 33
  • 72
13
votes
1 answer

{$WARN SYMBOL_PLATFORM OFF} does not turn off warnings

I have this piece of code: INTERFACE {$WARN SYMBOL_PLATFORM OFF} USES Winapi.Windows, etc, {$IFDEF MSWINDOWS}Vcl.FileCtrl, {$ENDIF} System.IniFiles; {$WARN SYMBOL_PLATFORM ON} The compiler shows: [dcc32 Warning] W1005 Unit 'Vcl.FileCtrl' is …
Gabriel
  • 20,797
  • 27
  • 159
  • 293
12
votes
1 answer

Are we responsible for drawing the caption when using Windows API to draw a Button?

Introduction I have been having a little fun with the Windows API and Parts and States and seeing how the controls can be painted onto a canvas. With a lot of trial and error I managed to come up with this procedure which will draw a button onto a…
Craig
  • 1,874
  • 13
  • 41
12
votes
3 answers

Does TAction.OnUpdate event degrade the performance?

In Delphi XE7, I use this trick to automatically enable or disable a toolbar button ("Edit ListView Item") according to whether an item in the ListView is selected or not, to prevent the user to click on the button if there is no ListView Item…
user1580348
  • 5,721
  • 4
  • 43
  • 105
11
votes
1 answer

Why I can access btn.Caption when btn is NIL?

Why this code does not crash? T is nil. How it is possible to access Caption if T is nil? procedure Crash; VAR T: TButton; begin T:= NIL; T.Caption:= ''; <---------- this…
Gabriel
  • 20,797
  • 27
  • 159
  • 293
1
2 3
60 61