How do I make Beyond Compare ignore certain differences while comparing versions of Delphi Form Files

Load a pair of DFM files showing the difference. Click the Session Settings button (aka Rules w/ umpire icon) or use the Session->Session Settings menu item. Switch to the Importance tab then click the Edit Grammar… button to open a second dialog. Click the New… button below the top listbox to open a third dialog. … Read more

Delphi: StringList Delimiter is always a space character even if Delimiter is set

You should set s1.StrictDelimiter := True for spaces not to be considered delimiters, more info here. Since you work in a version that does not support the above (as was clarified after the answer was submitted), you have two options: Find a character you know will not be used in the original text (e.g. underscore), … Read more

Why should I not use “if Assigned()” before accessing objects?

This is a very broad question with many different angles. The meaning of the Assigned function Much of the code in your question betrays an incorrect understanding of the Assigned function. The documentation states this: Tests for a nil (unassigned) pointer or procedural variable. Use Assigned to determine whether the pointer or the procedure referenced … Read more

What’s the difference between “var” and “out” parameters?

A var parameter will be passed by reference, and that’s it. An out parameter is also passed by reference, but it’s assumed that the input value is irrelevant. For managed types, (strings, Interfaces, etc,) the compiler will enforce this, by clearing the variable before the routine begins, equivalent to writing param := nil. For unmanaged … Read more

How should I prepare my 32-bit Delphi programs for an eventual 64-bit compiler? [duplicate]

First up, a disclaimer: although I work for Embarcadero. I can’t speak for my employer. What I’m about to write is based on my own opinion of how a hypothetical 64-bit Delphi should work, but there may or may not be competing opinions and other foreseen or unforeseen incompatibilities and events that cause alternative design … Read more

Selecting a directory with TOpenDialog

You can use the TFileOpenDialog (on Vista+): with TFileOpenDialog.Create(nil) do try Options := [fdoPickFolders]; if Execute then ShowMessage(FileName); finally Free; end; Personally, I always use the TFileOpenDialog on Vista+ and fallback using the SelectDirectory (the good one!) on XP, like this: if Win32MajorVersion >= 6 then with TFileOpenDialog.Create(nil) do try Title := ‘Select Directory’; Options … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)