Posts

Showing posts from July, 2014

I need help trying to figure out how use my development machine for both development and test install. I started building an install and I'm running into a "chicken-and-an-egg" thing.

I need help trying to figure out how use my development machine for both development and test install. I started building an install and I'm running into a "chicken-and-an-egg" thing.  I'm using the "{CSIDL_COMMON_APPDATA}\CCMath" path to store the database for my application. I don't want to build an installer that overwrites the "{CSIDL_COMMON_APPDATA}\CCMath" path and all the contents because that is the same location I use for development. There's got to be a way to initialize a different CSIDL path depending on if I'm running the program on my development machine.

Updated Developer Skill Sprint Schedule for Effectively Using Delphi Generics with Ray Konopka on Aug 5th

Originally shared by Jim McKeeth Updated Developer Skill Sprint Schedule for Effectively Using Delphi Generics with Ray Konopka on Aug 5th  http://delphi.org/2014/07/developer-skill-sprint-effectively-using-delphi-generics-with-ray-konopka

Originally shared by Jim McKeeth

Originally shared by Jim McKeeth Updated Developer Skill Sprint Schedule for Effectively Using Delphi Generics with Ray Konopka on Aug 5th  http://delphi.org/2014/07/developer-skill-sprint-effectively-using-delphi-generics-with-ray-konopka

Hi all

Hi all,  I have some ideas about the Delphi IDE. They are maybe something useful... maybe not but for me - they are definitely useful. If here isn't the right place for feedback - please help me about: to whom and how. If some of these ideas are already made - I apologize but If not - I'll vote for them with two hands. :) My current theme is the tree view of "Project manager". 1. The tree is too simple for me. I'd like to add more than one "Project group". I know that the switching between my groups is enough simple but... This functionality will be one of the features for which I'm ready to pay for my next Delphi. 2. Why there are no possibilities for subprojects ?  I have many project which are subprojects of someone of my huge projects. For example: list of groups and some of the projects contains subprojects. 3. If I want to find a unit or a form or a project or a group but not by searching by name :  - the possibilities of the sorting are ok but

Simple app to display all possible global settings in FireMonkey (service interfaces, globals, class vars and properties), and in RTL System units.

Simple app to display all possible global settings in FireMonkey (service interfaces, globals, class vars and properties), and in RTL System units. Can be useful when debugging or when testing a new device or FireMonkey version to check all parameters. Made with XE6, I wonder what I missed ! https://play.google.com/store/apps/details?id=com.steema.Delphi_Inspect https://play.google.com/store/apps/details?id=com.steema.Delphi_Inspect
Hola amigos tengo un problema es un error falta JvStdCtrls140.bpl el problema se me presento cuando intentaba instalar un componente en delphi 2010 espero que me puedan ayudar muchas gracias

4K Monitors: I'm curious if anyone is using 4K monitors yet for their development machine?

Image
4K Monitors: I'm curious if anyone is using 4K monitors yet for their development machine? They are getting cheap, 6x under $1000 on NewEgg. I'm running 1920x1200 on a 25' monitor; sales have been good and I wanted to buy a new monitor. It seems that the world is waiting for HDMI 3.0 in order to handle the bandwidth and video cards don't support it yet (I believe HDMI 2.0 works well in low fps, but is bad for gaming. DisplayPort can do it, but not many video cards have DisplayPort in PC land).

Does anyone know if Components4Developers is still in business or perhaps on vacation? I ordered and paid for a product from them yesterday and I'm still waiting for my license request to be approved. What a PITA it is to deal with these guys.

Does anyone know if Components4Developers is still in business or perhaps on vacation?  I ordered and paid for a product from them yesterday and I'm still waiting for my license request to be approved.  What a PITA it is to deal with these guys.

I've written an article about how to use C++ and Delphi combined in a single application. My approach uses Spring4D to inject implementations written in either Delphi or C++. The sources of this Demo will shortly be added to Spring4D sources on Bitbucket so stay tuned. Feel free to ask any questions, I'll be happy to improve this article further!

I've written an article about how to use C++ and Delphi combined in a single application. My approach uses Spring4D to inject implementations written in either Delphi or C++. The sources of this Demo will shortly be added to Spring4D sources on Bitbucket so stay tuned. Feel free to ask any questions, I'll be happy to improve this article further! https://bitbucket.org/sglienke/spring4d/wiki/CppSpring4d.md

What is "the" multithreaded framework for Delphi today?

What is "the" multithreaded framework for Delphi today? I suppose this question has two answers: the framework / code you are using in your apps, and the framework/code you would use in your apps if you could or that you'd use in a brand new app.  I'm interested in both answers. (I can think of a few possibilities, but there might be more I'm not aware of. For example: plain old TThread descendants; anonymous threads; threadpools and tasks (homebrew or library X); AsyncCalls; OmniThreadLibrary; ... I'm asking because I want to get a sense of what's commonly used, as well as what the ideal or state of the art one is that contributors here would like to use.)

I'm looking for binary DFM files that start with the TPF0 signature.

I'm looking for binary DFM files that start with the TPF0 signature. To my knowledge, there are two kind of binary DFM files: 1. the ones starting with a regular resource header 2. the ones starting with a TPF0 signature I found the first ones when converting a large project from an old Delphi version to a more current one, so I wrote a small conversion tool. Now I'm looking for the second one, to ensure the tool works fine on these as well. Anyone who has such files or who knows how to force the Delphi (2007-XE6) IDE to generate them?
I see that the latest OSX version, XE5 compiled programs do not run....I wonder if an XE6 compiled program is affected?

Blogged : Introducing VSoft.CommandLineParser for Delphi

Blogged : Introducing VSoft.CommandLineParser for Delphi http://www.finalbuilder.com/resources/blogs/postid/719/introducing-vsoftcommandline-for-delphi

Does anybody know how I can contact Ray Lischner, founder of Tempest Software? His homepage does not provide any contact information and also his employer (according to his homepage) Proteous does not really offer much in the way of contacting people there.

Does anybody know how I can contact Ray Lischner, founder of Tempest Software? His homepage does not provide any contact information and also his employer (according to his homepage) Proteous does not really offer much in the way of contacting people there. I would like to ask him some copyright related questions about a tool he wrote in the 1990s.

In the olden days[tm] there was a project for maintaining a Delphiversions.inc file which created human readable conditional defines from the VERxx conditional defines of the Delphi compilers. Since it seems to have vanished from the face of the Internet[tm] ..

In the olden days[tm] there was a project for maintaining a Delphiversions.inc file which created human readable conditional defines from the VERxx conditional defines of the Delphi compilers. Since it seems to have vanished from the face of the Internet[tm] .. http://blog.dummzeuch.de/2014/07/26/delphiversions-inc/

Over the years there have been multiple projects to provide a single, standard include file for identifying all Delphi versions with a more user friendly name than VERxxx. They usually looked like this:

Over the years there have been multiple projects to provide a single, standard include file for identifying all Delphi versions with a more user friendly name than VERxxx. They usually looked like this: {$IFDEF VER130} {$DEFINE Delphi5up} {$ENDIF} {$IFDEF VER140} {$DEFINE Delphi5up} {$DEFINE Delphi6up} {$ENDIF} {$IFDEF VER150} {$DEFINE Delphi5up} {$DEFINE Delphi6up} {$DEFINE Delphi7up} {$ENDIF} // and so on I remember/know of:  - delphiversions.inc which seems to have vanished from the face of the earth. All I could find on Google were some references to it from Delphi projects which have it in their repository. - jedi.inc which seems to be the most comprehensive one and is also actively maintained. It not only provides defines for compiler / RTL and other versions but also, most useful in my opinion, defines for language and RTL features like SUPPORTS_INT64 or HAS_UNIT_ANSISTRINGS, which I prefer greatly over using the VERxxx or DelphiXx_UP defines. Probably every component vendor als
In the IDE, we've got Ctrl+Y to delete current line at cursor, with MMX we can Ctrl+X to cut current identifier at cursor.  But I also want a shortcut to cut current line at cursor, any help?

Can anyone tell me how to get the name of the method in the code editor the cursor is currently in?

Can anyone tell me how to get the name of the method in the code editor the cursor is currently in? I know that I could access the editor buffer via OTA and parse it myself but I prefer a solution that already exists and works (probably in some of the IDE plugins out there).

So what's the status on the IDE when debugging X64 builds in XE6?

So what's the status on the IDE when debugging X64 builds in XE6? In XE3 we seem to have to restart it every 10-15 minutes because it craps its pants.

What could be the reason why this code fails in Delphi XE2 while it works in Delphi 2007? - Stack Overflow

http://stackoverflow.com/q/24955984/49925?sgp=2
I apologize if this has been asked before. How do you tell if an application was written with Delphi?

Blogged : DUnitX Updated - Filtering Tests, new command line options.

Blogged : DUnitX Updated - Filtering Tests, new command line options. http://www.finalbuilder.com/resources/blogs/postid/717/dunitx-updated-filtering-tests
has anyone tried viewing PowerPoint presentation onto any FireMonkey apps?

Anyone here implement google playservice for 1st august for delphi android admob?

Anyone here implement google playservice for 1st august for delphi android admob?

Little question about Styles

Little question about Styles If I create a new registered component based on a style, how can I bind a default style to this component ? This nice BitmapStyleButton required a style file loaded in a StyleBook http://monkeystyler.com/wiki/TBitmapSpeedButton Any way to avoid this ? http://monkeystyler.com/wiki/TBitmapSpeedButton

Delphi TDataset for node.js - https://github.com/KiPSOFT/tdataset

Delphi TDataset for node.js  -  https://github.com/KiPSOFT/tdataset https://github.com/KiPSOFT/tdataset
Hello, I'm looking for communication components which can be used on Android/ iOS (replace Indy).

We're still on the charts after all these years.

Image
We're still on the charts after all these years. Originally shared by Yi Yao Top 10 Programming Languages in 2014 Looking to learn a new web or embedded programming language? See graph below for trending or most looked for languages by employers. The graph is weighted and combined by Computational journalist Nick Diakopoulos and IEEE Spectrum with 12 metrics from popular sources such as IEEE Xplore, Google, and GitHub.  See all metrics and source here: http://spectrum.ieee.org/ns/IEEE_TPL/methods.html via:  http://spectrum.ieee.org/computing/software/top-10-programming-languages

I have 18 copies of JEDI.INC on my computer. That's not good.

I have 18 copies  of JEDI.INC on my computer.  That's not good.   What to do?

Let's change the alpha sorted class completion (Ctrl+Shift+C) back to how it used to work when it was introduced: no alpha sort, meaning that getter and setter are inserted at the same position.

Let's change the alpha sorted class completion (Ctrl+Shift+C)  back to how it used to work when it was introduced: no alpha sort, meaning that getter and setter are inserted at the same position. http://pic.twitter.com/HuirybrqlF

HI everyone. I'm having trouble compiling a project in XE. The project builds fine in XE2-XE6, and uses dotted unit names / namespaces. XE doesn't find a lot of the units, such as Vcl.Graphics, System.SysUtils, etc, since in XE they were not yet named with the prefixes, and so I thought I would try using unit aliases, "Vcl.Graphics=Graphics;Vcl.Forms=Forms;System.SysUtils=SysUtils", and so forth. This gets me a few compile steps further until I hit the error, "E2411 Unit ImgList in package vcl refers to unit Graphics which is not found in any package. Packaged units must refer only to packaged units". I can't make sense of that, I'm pretty certain Graphics.pas is in the VCL package! This occurs on a uses line, which uses only two units, "Vcl.Graphics, Vcl.Forms".

HI everyone. I'm having trouble compiling a project in XE. The project builds fine in XE2-XE6, and uses dotted unit names / namespaces. XE doesn't find a lot of the units, such as Vcl.Graphics, System.SysUtils, etc, since in XE they were not yet named with the prefixes, and so I thought I would try using unit aliases, "Vcl.Graphics=Graphics;Vcl.Forms=Forms;System.SysUtils=SysUtils", and so forth. This gets me a few compile steps further until I hit the error, "E2411 Unit ImgList in package vcl refers to unit Graphics which is not found in any package.  Packaged units must refer only to packaged units". I can't make sense of that, I'm pretty certain Graphics.pas is in the VCL package! This occurs on a uses line, which uses only two units, "Vcl.Graphics, Vcl.Forms". I have a brand new installation of XE Update 1, plus the hotfix for QC 90864 (an error I also ran into.) Any ideas? Is using unit aliases the right approach? I don't want to r

@ITDevCon 2014: Call4Papers are officially opened.

@ITDevCon 2014: Call4Papers are officially opened. The 6th edition is coming October 23th, 24th in Milan http://www.danieleteti.it/2014/07/21/itdevcon-2014-call4papers/ http://www.danieleteti.it/2014/07/21/itdevcon-2014-call4papers
Hello everybody , i search some styles for Android in Delphi XE6 because the design is not my job. Do you know any interesting web site ?
I just had an ah-ha moment. It finally click on how to use frames with the PageControl component. :-)

Type Library import generator tool has a interesting BUG!

Image
Type Library import generator tool has a interesting BUG! If you import component-> Import a type library, you can get a unit named like XXX_TLB.pas, for example, Office_TLB. Everything worked and fine, until I close all project and re-open it.  I found interesting thing happened :  If i double click TLB.pas file in Project manager dialog, it launch EXTERNAL editor which I assigned .pas extension.  Firstly, I thought something wrong with my project file? or perhaps the registry broken? I tried every possibilities without success.  Finally, I just tried to copy ALL content of that unit, and pasted to notepad, strange thing happened: just top part of content were pasted! ...So I tried to use Sublime editor to open that file, a "NUL" symbol vivid showed to my eyes!  Wow~ this is an invisible BUG. Even XE6 update1 still has this problem: " ultra NUL byte followed by XXXX.chm". The bug is existed for Every import library unit!  Just take a look for picture you will se

I am looking in to how late bindings occur with variants (such as TWordApplication) and why they can't be applied to objects, or can they?

I am looking in to how late bindings occur with variants (such as TWordApplication) and why they can't be applied to objects, or can they? From what I have came up with (right or wrong) is that there is some compiler magic involved and it is around the IDispatch interface. So why can't an object, that implements the IDispatch interface, have late binding calls? Is it because of the compiler magic that happens? I don't mind reading, so if there are any links you have got, I wouldn't mind reading them :-D

Hello

Hello, Is there a OSX developper community ?  For a beginner on OSX, it's very difficult to find informations for sandboxing Delphi application, in order to distribute with the Mac Apple Store... Sandboxing sucks a lot, too much restrictions, standard tools/procedures don't work, have to finalize manually, etc. Also, I have to use XPC Services but I don't find any information to do it with Delphi... :-(  Is Delphi Cocoa implementation complete ? Any idea ?

Hi guys

Hi guys, I live in France, near Aix-en-Provence. I startedDelphi in 2001 (Delphi 5) and stopped with Delphi 2007. But now, I have to maintain several applications with XE5. After C#, C++ and others, it's a flash back for me ! I hope the community is always active.

Have you ever wanted to draw fully justified text (ie, text that adheres to both the left and right sides of the destination rectangle)? It's more complicated than it seems, and there's definitely no inbuilt support in the VCL. But here's how to do it, including an open-source unit you can drop into your applications and use.

Have you ever wanted to draw fully justified text (ie, text that adheres to both the left and right sides of the destination rectangle)? It's more complicated than it seems, and there's definitely no inbuilt support in the VCL. But here's how to do it, including an open-source unit you can drop into your applications and use. http://parnassus.co/?p=439

Chuckle of the day:

Chuckle of the day: const   CLRF = #13#10; And it was defined local in multiple methods.

As an alternative to Alternate Data Streams what would you suggest?

As an alternative to Alternate Data Streams what would you suggest? I actually like ADS although there are drawbacks such as lost data upon zipping a file, or emailing, FtP'ing. I'm interested in keeping non visible data attached (or associated with) to multiple file types.

Hi all

Hi all, Is it possible to figure out whether a type's property has a 'stored' flag or not, preferably without having to create an instance of that type? Like this: property Value: string read GetValue write SetValue stored ShouldStoreValue; with a private function ShouldStoreValue: Boolean; in the same class. We've got this calculation core working with a fairly elaborate internal data structure. We're using NativeXML's ObjectToNode routines for saving and loading the data structure; this works beautifully. Now other parties are going to be communicating with that calculation core, and the easiest way of doing that is via the data structure generated by NativeXML.  Ideally, we would like to generate something akin to an XSD, an XML Schema Definition, for it. Using the 'new' RTTI units, this appears out to be quite feasible. The only catch is that we rely quite often on the 'stored' flag of a property to determine whether that property needs

Could you please remind me if Objects support polymorphism?

Could you please remind me if Objects support polymorphism? For instance, I can not compile the following code:   TObj1 = object     procedure DoWork; virtual;   end;   TObj2 = object(TObj1)     procedure DoWork; override;   end; [Error] Unit1.pas(15): Declaration of 'DoWork' differs from previous declaration [Error] Unit1.pas(15): Field definition not allowed after methods or properties [Error] Unit1.pas(16): Type expected but 'END' found
I don't know which is worse...the with statement or data-aware controls. Both should be banished forever.

I have a specialized need, and though it seems as though it should not be difficult, it is something with which I have no experience.

I have a specialized need, and though it seems as though it should not be difficult, it is something with which I have no experience. I must insert a graphic image into a spreadsheet, and the spreadsheet component we use insists on a rectangle of cells for placement, then resizes the image to fit the given rectangle. What I need as a workaround is to put the image at its normal size into a rectangular image that is the size of the target area of white. My naive first thought is to create a TImage of the size needed for the target, and fill it with white. Then load the graphic into a second TImage, and copy that bitmap, then paste it to the upper left in the first TImage. Is that workable? I am not looking for performance here, just a workaround for an otherwise unresolvable limitation in a third party component which we will not be updating. If anyone can suggest a very simple solution, it need not be elegant, just workable. And hopefully without adding yet another large library to the

Using XE6 and Firemonkey mobile, I'm trying to set a style look up for a TListBoxItem (which is in the style book) but it seems to be ignoring it. Any ideas of what I need to do? the code I am using is

Using XE6 and Firemonkey mobile, I'm trying to set a style look up for a TListBoxItem (which is in the style book) but it seems to be ignoring it. Any ideas of what I need to do? the code I am using is  T := TListBoxItem.Create(nil);  T.Parent := DetailsList;  T.StyleLookUp := 'detailitem'; which is the code in the custom list box sample app.. Any ideas gratefully received.
Just cloned Spring4D, and ran Build for XE5. Motivation was to do some testng with Nick Hodges' code form his book. When I try to build Nick's code, I get an error because XE5 cannot find Spring.Container.... or any Spring unit.

i have some serious problems using RoboCopy. I'd like to throttel bandwith. Microsoft provides the parameter IPG which sets a delay (in ms) between two send packages. The size of a single package is 64Kbyte as far as i know. But setting IPG to 1000 (1Package/second) does not limit the bandwith of RoboCopy to 64KByte/Sec. Bandwith is still too high(estimated time for my file 32Seconds, but required only 3 seconds. 2.15MByte filesize).

i have some serious problems using RoboCopy. I'd like to throttel bandwith. Microsoft provides the parameter IPG which sets a delay (in ms) between two send packages. The size of a single package is 64Kbyte as far as i know. But setting IPG to 1000 (1Package/second) does not limit the bandwith of RoboCopy to 64KByte/Sec. Bandwith is still too high(estimated time for my file 32Seconds, but required only 3 seconds. 2.15MByte filesize). After googling around i found that ipg depends on the given speed of the connection/interface robocopy is using(copying between 2 hdds?!) Sofar this parameter seems useless to me for limiting the bandwith as i cant predict the ipg(without knowing the exact performance of the connection) http://technet.microsoft.com/de-de/library/cc733145%28v=ws.10%29.aspx Somebody an idea? http://technet.microsoft.com/de-de/library/cc733145%28v=ws.10%29.aspx

Hi

Hi I need help with word automation. I need to open a word file, add a watermak and save it as pdf. I can Open it and save it to pdf with the below code but couldn't manage to add a watermark. I saved a macro while adding the watermark but I'm having difficulty changing the macro to delphi code. Any help will be appreciated var    WordApp, Doc: Variant; begin    WordApp := CreateOleObject('Word.Application');    Doc := WordApp.Documents.Open('D:\document.doc');    // addwatermark???    Doc.ExportAsFixedFormat('D:\document.pdf', 17);    WordApp.Quit;    Doc := Unassigned;    WordApp := Unassigned; The macro: Sub watermark()     ActiveDocument.Sections(1).Range.Select     ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader     Selection.HeaderFooter.Shapes.AddTextEffect(PowerPlusWaterMarkObject, "URGENT", "Calibri", 1, False, False, 0, 0).Select     Selection.ShapeRange.Name = "PowerPlusWaterMarkObject"     Select

"NEVER EVER rely on the value of the for variable, after the loop." isn't-it ?

"NEVER EVER rely on the value of the for variable, after the loop." isn't-it ? but I've found this function in FMX.Types function GetToken(var S: string; const Separators: string; const Stop: string = ''): string; var   I: Integer;   Breaks: string; begin   Breaks := Separators + Stop;   for I := 0 to S.Length - 1 do   begin     if Breaks.Contains(S.Chars[I]) then       Break;   end;   Result := S.Substring(0, I);   S := S.Substring(I + 1); end; ???!!!!

Blogged : "Mocking Multiple Interfaces - Delphi Mocks"

Blogged : "Mocking Multiple Interfaces - Delphi Mocks" Pushed an update to Delphi Mocks today which allows easier mocking for multiple interfaces. Also made a quick little blog post about it. Enjoy! #delphi  #delphi-mocks  #unittesting http://www.finalbuilder.com/resources/blogs/postid/716/mocking-multiple-interfaces-delphi-mocks http://www.finalbuilder.com/resources/blogs/postid/716/mocking-multiple-interfaces-delphi-mocks

Has anyone tried using BoxedApp SDK? What are your thoughts on this product?

Has anyone tried using BoxedApp SDK? What are your thoughts on this product?  Developer's Description: "BoxedApp SDK is a developer library that provides a set of functions for emulating a file system and a system registry for an application. Using these functions, you can create virtual files, fake registry entries, keys and values. You can launch processes from memory directly, use ActiveX without registration, embed runtimes like .Net, Flash and VC++ redistributable." http://www.boxedapp.com/boxedappsdk/index.html

Are there any Delphi developers in Istanbul? I am here today and will be tomorrow too - a lightning-fast trip - but am interested in meeting other Delphi developers (tomorrow afternoon maybe) if anyone's around?

Are there any Delphi developers in Istanbul? I am here today and will be tomorrow too - a lightning-fast trip - but am interested in meeting other Delphi developers (tomorrow afternoon maybe) if anyone's around? (I'm an Australian developer living in Europe, the author of TFireMonkeyContainer and a few other things, not all of which are public yet. I run this company:  http://parnassus.co/?page_id=9 ) http://parnassus.co/?page_id=9

Delphi XE6 : Someone use new tethering feature in android ? it works but all apps always crashes on exit. a simple Hello word app with only component on it.

Delphi XE6 : Someone use new tethering feature in android ? it works but all apps always crashes on exit.  a simple Hello word app with only component on it. have any idea? thansk
Video: Effectively Using Raize Components by Ray Konopka #delphi

I have just added preliminary support for Delphi XE5 and XE6 to tdbf. Preliminary in this context meaning that I added the proper conditional defines to dbf_common.inc and created packages for the new versions. They compile, but I have not tested them.

I have just added preliminary support for Delphi XE5 and XE6 to tdbf. Preliminary in this context meaning that I added the proper conditional defines to dbf_common.inc and created packages for the new versions. They compile, but I have not tested them. I also found and fixed a bug related to unicode strings that resulted in edits to a float field writing 0 rather than the edited value. The changes are in the svn repository on sourceforge. Please note that there are known problems with index files in the current sources. https://sourceforge.net/p/tdbf/code/HEAD/tree/

I was playing around with Refactoring from with the IDE.

Image
I was playing around with Refactoring from with the IDE. I right clicked chose Refactoring > Find Unit... and received this pop up message:

I was playing around with Refactoring from with the IDE. I right clicked chose Refactoring > Find Unit... and received this pop up message:

Image
I was playing around with Refactoring from with the IDE. I right clicked chose Refactoring > Find Unit... and received this pop up message:
I have been doing a lot of coding for export to Excel spreadsheets. Formatting strings such as '$#,0.00;[Red]($#,0.00)' appear to be used also by some formatting routines in Delphi. So I am curious now to know where--at the lowest level--such strings have been defined. Do they exist as system constants in some library unit?

The Delphi IDE allows you to add fields to a TDataset (descendant e.g. TTable, TQuery, TAdoTable etc.) by right clicking on the component and selecting “Add Field” or “New Field”. For a particular project I didn’t want to do that because I kept changing the query for which I want to add the fields. But since there was one calculated field I had to add fields to the dataset otherwise the OnCalcFields event wouldn’t be called. So I ended up adding the fields in code.

The Delphi IDE allows you to add fields to a TDataset (descendant e.g. TTable, TQuery, TAdoTable etc.) by right clicking on the component and selecting “Add Field” or “New Field”. For a particular project I didn’t want to do that because I kept changing the query for which I want to add the fields. But since there was one calculated field I had to add fields to the dataset otherwise the OnCalcFields event wouldn’t be called. So I ended up adding the fields in code. Basically that’s easy, you just create a TField descendant (e.g. TStringField,TAutoIncField, TDateTimeField etc.) set the field name and dataset and that’s it. But there are some pitfalls http://blog.dummzeuch.de/2014/07/12/adding-fields-to-a-tdataset-in-code/

New Blog Post:

New Blog Post: How to Replace Global Variables with a Static Class http://capecodgunny.blogspot.com/2014/07/how-to-replace-global-variables-by.html #delphi

Q: Anyone know what happened to the ICS website?

Q: Anyone know what happened to the ICS website?  http://www.overbyte.be/ I'm working to convert a client's software to use ICS, but it's down. Lately, I've been getting a little nervous spending time to use projects than wind up dead. Just found out SoftwarePassport.com was discontinued. Sadly, I've been recommending it to people for wrapping their code up with a licensing-layer. Only to have them go bye-bye and require re-engineering. http://www.overbyte.be

OXml left beta.

OXml left beta. I finally released OXml 1.0. Read details on my blog! #delphi #oxml #xml   http://blog.kluug.net/2014/07/11/oxml-left-beta/

Does this still works in XE6?

Does this still works in XE6? The online help ( http://docwiki.embarcadero.com/RADStudio/XE6/en/Parameters_%28Delphi%29 ) says "With an out parameter, however, the initial value of the referenced variable is discarded by the routine it is passed to" but in Delphi XE i dont get an EAV which i should get, if it is implemented in the way the help says... http://pastebin.com/cypPefUd

Can anyone tell me if this bug from XE2 is fixed in any later versions :

Can anyone tell me if  this bug from XE2 is fixed in any later versions :  Unable to rename 'I:\FBAT_HG\Src\Core\Actions\VSoft.Core.Actions.Service.$$$' to 'I:\FBAT_HG\Src\Core\Actions\VSoft.Core.Actions.Service.pas'. I'm basically unable to edit my source code in delphi XE2 at the moment! Grrrrrrrr.

I must admit I fully expected the following code not to work at all, but was pleasantly surprised.

I must admit I fully expected the following code not to work at all, but was pleasantly surprised. Cheers Delphi :) type   TRec = record     v1, v2: UInt64;     class operator Implicit(const v: array of UInt64): TRec;   end; { TRec } class operator TRec.Implicit(const v: array of UInt64): TRec; begin   result.v1 := v[0];   result.v2 := v[1]; end; var   r: TRec; begin   r := [42, 123];   WriteLn(r.v1);   WriteLn(r.v2); end.

Am trying to setup DUnitX in XE5. Found that it needs Delphi-Mocks. Trying to build Delphi-Mocks, I find that it does not recognize that XE5 qualifies as DELPHI_XE2_UP. Yet Delphi.Mocks.inc appears to be correct... Any suggestions?

Am trying to setup DUnitX in XE5. Found that it needs Delphi-Mocks. Trying to build Delphi-Mocks, I find that it does not recognize that XE5 qualifies as DELPHI_XE2_UP. Yet Delphi.Mocks.inc appears to be correct...  Any suggestions? I am new to the XE5 environment, as well as to Delphi-Mocks, which I just pulled from Git in the last half-hour. I should mention that I do not have FinalBuilder in XE5, so am simply trying to build from the groupproj.

QC request for adding Git support

QC request for adding Git support http://qc.embarcadero.com/wc/qcmain.aspx?d=126025

QC request for adding Mercurial support

QC request for adding Mercurial support http://qc.embarcadero.com/wc/qcmain.aspx?d=126013

I am using Axolot components for Excel export. I need to word-wrap some cells which may contain long strings. Applying the wrap property does not cause the component to resize the row height, however.

I am using Axolot components for Excel export. I need to word-wrap some cells which may contain long strings. Applying the wrap property does not cause the component to resize the row height, however.  My own efforts to resolve the problem have been less than pleasing. As long as the (merged) target cell is fairly wide, and the number of rows needed is small, then I get the proper result. However, if the target cell is relatively narrow, then my height adjustment will be wrong. And what makes it very difficult to understand is that for two different cell widths in the same sheet, using the same string, one will be made higher than needed, by several text rows, and the other will be made not high enough, by a couple of rows. I have considered getting the actual string width from a canvas, but the component is in a data module, so no canvas is available.  Any thoughts? Also on StackOverflow:   http://stackoverflow.com/questions/24679605/wrapping-text-in-export-to-excel
Title

Unanswered Stack Overflow Question. I'd still like an answer please.

Unanswered Stack Overflow Question. I'd still like an answer please. http://stackoverflow.com/questions/23642427/where-is-the-component-toolbar-configuration-data-stored-in-delphi-xe4

Is there any reason why you can't use "is" to check type compatibility between interfaces? You can use it between object references, interfaces to objects, just not interfaces to interfaces.

Is there any reason why you can't use "is" to check type compatibility between interfaces?  You can use it between object references, interfaces to objects, just not interfaces to interfaces. Consider: type   IInterfaceA = interface    // GUID here   end;   IInterfaceB = interface(IInterfaceA)   // GUID here   end; var   IA : IInterfaceA;   IB : IInterfaceB; begin   IB := GetIB;   if IB is IInterfaceA then     IA := IB; // or IA := IB as IA; end; This doesn't compile: "E2015 Operator not applicable to this operand type" on the line "if IB is IInterfaceA". But, while you can use "as", on Win-native "as" will throw an exception if it can't convert.  On .Net I think from memory it returned nil - more useful, because then at least you can test "is" via "if Assigned(IB as IA)". In the end, you need to use Supports:   if Supports(IB, IInterfaceA, MyIInterfaceAVar) then... which requires an extra variable and lo

Character Encoding, REST and Firemonkey (XE6)

Character Encoding, REST and Firemonkey (XE6) Have a bit of a character encoding issue. I have  a webbroker application that provides a JSON array (built using XSuperObject) to a Firemonkey mobile application. The problem I am having is that extended characters such as in 'Coppélia' , fine when added to the array, looks ok when added to Response.Content (either with or without UTF8 encoding), but always shows as 'Copp�lia' or if UTF8 decoded 'Copp?lia'. the encoding is set on the response:   Response.ContentType := 'application/json';   Response.ContentEncoding :=  + 'application/json;charset=utf-8'; Any ideas?

New blog post http://theroadtodelphi.wordpress.com/2014/07/07/dic-now-supports-vcl-styles/

New blog post http://theroadtodelphi.wordpress.com/2014/07/07/dic-now-supports-vcl-styles/ http://theroadtodelphi.wordpress.com/2014/07/07/dic-now-supports-vcl-styles
I'll test it out but does anyone know right off the bat if I can cast a byte into Ansichar successfully?  Should work, if the original byte is encoded to be Ascii (8 bit)?

So, I got a "s: string" which I need to convert this to ASCII.

So, I got a "s: string" which I need to convert this to ASCII. The issue is that s may contain non-ASCII characters, in which case I want to raise an exception. For the life of me I can't find any TEncoding function which returns any error code or similar. Any ideas?
Wow, I just discovered that Delphi comes with Beyond Compare.

What are the alternatives to using a globals.pas file?

What are the alternatives to using a globals.pas file? I've heard stuff like "you should pretend that globals don't exist". Isn't this similar to the same argument "you should never use a goto". Thanks to Uwe Raabe and others, I just learned I should be using an application specific sub-folder of CSIDL_COMMON_APPDATA or FOLDERID_ProgramData to store the database needed in my application. This gets me part way there. I still need a name for this sub-folder and a way to refer to this sub-folder from within the code.  Rather than hard-coding a literal I was planning on creating a constant and placing it inside of globals.pas. Something like: const   CCMATH_AppFolder : string = 'My Folder Name";   CCMATH_Copyright : string = 'Copyright bla bla bla";   CCMATH_Website : string = ' www.website.com "; I'd like to here how you guys go about storing and using this type of information within your programs.

Does anyone know if (Delphi) environment variables can be nested within other (Delphi) environment variables?

Does anyone know if (Delphi) environment variables can be nested within other (Delphi) environment variables? For example,  THIRD_PARTY= C:\Path\To\Third\Party\Components\ GUI = $(THIRD_PARTY)GUI\ VIRTUAL_TREE = $(GUI)virtual-treeview\Source So if I change where my GUI third-party directory exists, the path to virtual tree will automatically get updated.

You might already know about Gorm, but probably not. It's a hidden gem in the dxgettext subversion repository.

You might already know about Gorm, but probably not. It's a hidden gem in the dxgettext subversion repository. http://blog.dummzeuch.de/2014/07/05/gorm-experimental-release/

What are your thoughts on the Blaise Pascal Magazine?

What are your thoughts on the Blaise Pascal Magazine? http://www.blaisepascal.eu/ I was a huge fan of PC Techniques and Visual Developer magazines put out by Jeff Duntemann .

So I was just writing some code for fun which required basic use of 3D vectors, quaternions and matrices.

So I was just writing some code for fun which required basic use of 3D vectors, quaternions and matrices. Great I thought, Delphi has that in System.Math.Vectors now, thanks to FireMonkey. Now, considering at least half of FireMonkey is about 3D rendering, it's impressive that the core math routines are written by someone who clearly does not know the first thing about linear algebra. As a result, System.Math.Vectors is one big clusterfuck of bad code. Some highlights: - TVector3D.CrossProduct() is deprecated apparently, telling us to use TPoint3D.CrossProduct() instead. Never mind that the cross product is only defined for vectors and not for points. In fact, TPoint3D contains several methods which simply does not make sense for points, and in reality is a vector in disguise. - The Equal operator overloads use epsilon checking. This should not be done by default, because it may not be what the user wants. In addition, the epsilon is fixed (though fortunately not constant), requiri

When you compile from IDE, any Source thats opened in the ide is passed directly to the compiler.

When you compile from IDE, any Source thats opened in the ide is passed directly to the compiler. Anybody knows which method is used? Is an IOTAEditReader created to pass the source?
When you compile from IDE, any Source thats opened in the ide is passed directly to the compiler. Anybody knows which method is used? Is an IOTAEditReader created to pass the source?

As a result of a question I posted on stackoverflow about how to add an image to button in firemonkey I made this quick video to demonstration how it's done.

As a result of a question I posted on stackoverflow about how to add an image to button in firemonkey I made this quick video to demonstration how it's done. http://www.youtube.com/watch?v=STjQdGDmcNk

New blog post

New blog post http://capecodgunny.blogspot.com/2014/07/choose-right-folder-for-your.html
what is the simplest way to create a json array from dataset?

The Lost 1984 Video: young Steve Jobs introduces the Macintosh

http://www.youtube.com/watch?v=2B-XwPjn9YY&feature=share

We are happy to announce TestDriver, the latest addition to our Nexus Quality Suite performance and verification tools suite.

We are happy to announce TestDriver, the latest addition to our Nexus Quality Suite performance and verification tools suite. New - TestDriver! ================= The TestDriver tool is a testing robot targeted toward graphical Windows applications. TestDriver records mouse and keyboard actions to produce an editable script and allows capturing certain aspects of the program under test. This is a very powerful tool for testing graphical applications as the scripts can be modified to use typical programming constructs such as loops, conditions, function calls, assignment, parameters and verification. Scripts can be created in Basic, C or Pascal language style. The best part: The entire Quality Suite is still only AUD 300. Take advantage of the offer today and save! MethodTimer =========== The MethodTimer tool is a method level performance analyzer. It measures and reports activity in your code with the purpose of identifying performance bottlenecks. It records routine calls and reports t

I'm afraid this has been asked already, but is any reliable and easy way to know what delphi packages have been...

I'm afraid this has been asked already, but is any reliable and easy way to know what delphi packages have been compiled into application with packages. The goal is to provide all the packages used in the application as BPLs.
I'm afraid this has been asked already, but is any reliable and easy way to know what delphi packages have been compiled into application with packages. The goal is to provide all the packages used in the application as BPLs.

Which QC reports are the most important for you?

Which QC reports are the most important for you? https://forums.embarcadero.com/thread.jspa?threadID=106601&tstart=0

What's new in Devexpress VCL 14.1

What's new in Devexpress VCL 14.1 http://www.youtube.com/watch?v=dTWkYzoD7qs&feature=share&list=UUtOjyugQSbxjQGuimGVsLVg

Q: Is Delphi's DataModule supposed to be able to handle components that aren't derived from TPersistent?

Q: Is Delphi's DataModule supposed to be able to handle components that aren't derived from TPersistent? I'm refactoring my program to use TFrames under Delphi XE2 Pro. In this process, I've ran into a specific need to have access to TImageList shared among multiple forms. Immediately, I had a problem adding the TImageList component to the TDataModule with "ClassNotFound". However, a simple Google Search yielded a "fix"... http://stackoverflow.com/questions/14097246/delphi-xe2-data-module-expects-only-database-components My Question, is this a hack? Is it a bug that was fixed in later versions of Delphi (XE3 appears to have the same behavior). Outside of actual data-components, I've never really used the DataModule for other types. Is is ok? Commenting out the following line fixes it for me, but I need to know if this is proper. {%CLASSGROUP 'System.Classes.TPersistent'} http://stackoverflow.com/questions/14097246/delphi-xe2-data-module-e

I think I should visit Thomas at work some time. This looks very interesting.

I think I should visit Thomas at work some time. This looks very interesting. Originally shared by Thomas Mueller (dummzeuch) Falls es jemanden interessiert, womit ich so meine Brötchen verdiene: Hier ist ein Beitrag in der Lokalzeit Ruhr zum Thema Straßenzustandserfassung auf Autobahnen in NRW. Die Software auf dem Fahrzeug und zur Auswertung ist von meinem Team, geschrieben in #Delphi und #BorlandPascal (letzteres immer weniger ;-) ) http://www1.wdr.de/mediathek/video/sendungen/lokalzeit/lokalzeit-ruhr/videostrassennrwprueftautobahnschaeden100_size-L.html?autostart=true#banner

Is there a known issue in newer Delphi versions with OLEControl-ing i.e. Excel? I have some code which works fine when comiled with Delphi 2010:

Is there a known issue in newer Delphi versions with OLEControl-ing i.e. Excel? I have some code which works fine when comiled with Delphi 2010: AExcel := CreateOleObject('Excel.Application'); AExcel.Workbooks.Add; AExcel.Range[AExcel.Cells[1,6], AExcel.Cells[1,6]].Select; AExcel.Selection.VerticalAlignment := $FFFFEFC0; //xlTop; When compiled with XE5 or XE6 I get an error message executing the third line of code: "Impossibile impostare la proprietà VerticalAlignment per la classe Range." Which means "impossible to set the property VerticalAlignment of the class Range". Same results with Excel 2010 (32 bit) on Windows 8.1 64 bit and on Windows Server 2008 R2 64 bit and with Excel 2013 (32  bit) on Windows Server 2012R2 64 bit. This tells me that it really has to di with the Delphi version, not with actual version and combination of Windows/Office. Any ideas?

Q: Is there a way for me to Cut/Paste Design-Time Components and include the events too?

Q: Is there a way for me to Cut/Paste Design-Time Components and include the events too? I'm transitioning some UI elements away from the main-form and into TFrames. Currently, I'm using Cut/Paste in the IDE to move the component from one to another; however, it doesn't bring over the code for the events (OnClick, OnExit, etc).  Is there a method for using Cut/Paste and have it bring over the code assigned to the events for the component? This would save a lot of work. Currently I have a text-dump of the *.DFM and I'm using it as a reference for the procedures that are linked to the events for the object. Then one-by-one, I go through the text-dump and search them in the IDE, then cut/paste the code into the new event in the frame. It's really error prone.

I hate Variants, did I say that before? They just make everything more complex than necessary.

I hate Variants, did I say that before? They just make everything more complex than necessary. Did you ever try to compare two variants? E.g. you have got one that contains an empty string (”) and another that contains a date. Now you want to know whether they are equal or not. Simple? if v1 <> v2 then     WriteLn('not equal') else     WriteLn('equal'); Not so. The code above raised a EVariantConversionError exception because it could not convert an empty string into a date. ... http://blog.dummzeuch.de/2014/07/01/comparing-variants/

really ugly exception handling... maks no fun wading through such code...

really ugly exception handling... maks no fun wading through such code... ...   except     // During testrun we just log and don't raise     on E: Exception do begin       if Options.IsTestRun and (E is EXXXImportException) then begin         if E.InnerException <> nil then           DoLog(CoreRStr.NIS_IMPORTCSV_ERROR + ' ' + E.Message + ' ' +             CoreRStr.sReason + ': ' + E.InnerException.ClassName + ': ' + E.InnerException.Message)         else           DoLog(CoreRStr.NIS_IMPORTCSV_ERROR + ' ' + E.Message);       end else         raise;     end;   end;

I've released TML/SIDEX 1.1.2 with many improvements on Delphi components.

I've released TML/SIDEX 1.1.2 with many improvements on Delphi components. https://www.tml-software.com/downloads/

Application size comparision D2009 -XE6:

Application size comparision D2009 -XE6: I have finally managed to reserect my software after a hard drive crash using files I have found/recovered from a back up drive/on another computers I have managed to get it to compile in XE6 took a bit of doing, coming from D2009 originally, lots of components used to get to work in XE6, etc the interesting thing is the size of the .exe has doubled in size (RTL to blame I guess) but from what I can tell, the speed of loading is no less There is alot of code (years of work) anyway, just thought I would share :) ( I have read other threads about the increse in .exe file from older to newer delphi versions so was not surprised) one goood thing is now on W8, there is no need to set to run as administrator