delphi-2009

Hooking a Stacktrace in Delphi 2009

╄→гoц情女王★ 提交于 2019-12-03 15:28:01
问题 The Exception class in Delphi 2009 received a number of new features. A number of them are related to getting a stacktrace: property StackTrace: string read GetStackTrace; property StackInfo: Pointer read FStackInfo; class var GetExceptionStackInfoProc: function (P: PExceptionRecord): Pointer; class var GetStackInfoStringProc: function (Info: Pointer): string ; class var CleanUpStackInfoProc: procedure (Info: Pointer); Has anyone used these to obtain a stack trace yet? Yeah, I know there are

DoubleBuffered property being added in the dfm in Delphi 2009 does not exist in Delphi 2007

这一生的挚爱 提交于 2019-12-03 15:06:14
Does that mean that I can't share a Form between delphi 2007 and 2009? Yes. It is not possible unless you remove the properties that are not published in Delphi 2007 from the DFM. Ondrej Kelle DoubleBuffered has been in TWinControl for some time now. The difference in Delphi 2009 is that it's published now. If you can live with only ignoring the errors (and not making the properties work instead), here is a possible solution: unit Delphi2009Form; interface uses Windows, Classes, SysUtils, Controls, Forms; type {$IFDEF VER200} TDelphi2009Form = class(TForm); {$ELSE} TDelphi2009Form = class

Tools which can parse Delphi XMLDoc format and build online help

淺唱寂寞╮ 提交于 2019-12-03 14:11:06
问题 The XMLDoc tool for API documentation is explained here: http://edn.embarcadero.com/article/32770 Are there any free or commercial tools which can be used to create documentation based on Delphi's XML doc format? Is there a newer version of the 'getting started' documentation? This page refers to Delphi 2005 and third party tools, some of them seem to have moved. The XMLDoc for Delphi 2005 required Python (tested with Python 2.3) Instant Saxon (tested with Instant Saxon 6.5.3) The Java SDK

How can I set the default file format in the Delphi IDE to UTF8?

浪子不回头ぞ 提交于 2019-12-03 13:12:07
问题 Delphi 2009 sets the default file format for new source code files to ANSI, this makes the source code platform-dependent. Even for a new XSD file created in the IDE, which by default starts with this line <?xml version="1.0" encoding="UTF-8" ?> Delphi sets the file format to ANSI (this looks like a bug, for new XML and XSLT documents UTF8 is selected by default). Is there a hidden option to set the default file format for source code files? 回答1: AFAIK, there is no IDE-wide setting for

Class Helper for generic class?

倖福魔咒の 提交于 2019-12-03 12:53:06
问题 I'm using Delphi 2009. Is it possible to write a class helper for a generic class, i.e. for TQueue . The obvious TQueueHelper <T> = class helper of TQueue <T> ... end; does not work, nor does TQueueHelper = class helper of TQueue ... end; 回答1: As documented in the Delphi help, class helpers are not designed for general purpose use and they are incorrectly perceived as having a number of limitations or even bugs as a result. nevertheless there is a perception - incorrect and dangerous in my

Delphi and i18n

你说的曾经没有我的故事 提交于 2019-12-03 12:46:40
Does Delphi support internationalization in any way? I've seen that I can add different languages for a project, but that seems to create multiple instances of the dfm files. Am I right that the language therefore cannot be changed at runtime? How do you handle internationalization (if you do)? Are there any best-practices? I have once experimented with runtime change of languages. It worked great, but I needed to write lots of code myself (and circumvent the dfm files). The problem is, it is a lot of hassle and you almost never need this. The better option (in my opinion) is to create a base

Why is the executable produced by Delphi 2009 IDE different to that produced on the command line?

China☆狼群 提交于 2019-12-03 11:58:36
I'm producing builds using MSBuild, and build configurations set up in the dproj on the command line. It's slightly disconcerting that the size of the executables thus produced are different (not by much, but still!) to what an IDE build produces. Any ideas why? I would have thought the same compiler is used? To see what IDE is doind, check Tools | Options | Environment Options | Compiling and Running | Show Command Line And you can check the compiler messages. The main power of building from the Delphi command-line compiler is standardization - you explicitly identify the options (on the

Process for localization of Delphi 2009 app by volunteer translators?

馋奶兔 提交于 2019-12-03 09:57:31
问题 I have a freeware scientific app that is used by thousands of people in nearly 100 countries. Many have offered to translate for free. Now that D2009 makes this easier (with integrated and external localization tools, plus native Unicode support) I'd like to make this happen for a few languages and steadily add as many as user energy will support. I'm thinking that I'll distribute a spreadsheet with a list of strings (dozens but not hundreds) to be translated, have them return it, and compare

Problem with setting Browsing Path in Delphi option page

天涯浪子 提交于 2019-12-03 09:30:15
问题 I have a problem with setting Browsing Path in Delphi 2009: When I install a new component, I add DCU path to Delphi's Library Path, and source path to Delphi's Browsing Path. The application compiles fine, but holding Ctrl and clicking on any of the unit names for that component does not open the source file! It seems the only way to make it work is to add source path to Library Path, but this means I have to compile all the units belonging to third-party components every time I build my

Why do interface implementations based on TComponent leak memory?

别说谁变了你拦得住时间么 提交于 2019-12-03 08:43:33
问题 This Delphi code will show a memory leak for an instance of TMyImplementation: program LeakTest; uses Classes; type MyInterface = interface end; TMyImplementation = class(TComponent, MyInterface) end; TMyContainer = class(TObject) private FInt: MyInterface; public property Impl: MyInterface read FInt write FInt; end; var C: TMyContainer; begin ReportMemoryLeaksOnShutdown := True; C := TMyContainer.Create; C.Impl := TMyImplementation.Create(nil); C.Free; end. If TComponent is replaced by