I mailed the DelphiFeeds people to add the MonkeyStyler Blog by Mike Sutton.
It is a nice Delphi related blog focussing on FireMonkey stuff.
–jeroen
Posted by jpluimers on 2013/02/15
I mailed the DelphiFeeds people to add the MonkeyStyler Blog by Mike Sutton.
It is a nice Delphi related blog focussing on FireMonkey stuff.
–jeroen
Posted in Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Development, FireMonkey, OS X FMX, Software Development | 4 Comments »
Posted by jpluimers on 2013/02/06
One of the really nice contributions on StackOverflow by Allen Bauer is almost 3 years ago.
It is about these three Delphi VCL methods introduced by TWinControl to make control development easier:
The really cool thing is that this API has been stable since 1995, and still allows you to subclass windows controls or create your own controls in a very simple way.
Note that Allen does not cover DestroyWnd or DestroyWindowHandle, but those are just counterparts of CreateWnd and CreateWindowHandle.
In normal Delphi application code, you have less Destroy overrides than Create overrides, and the same holds for control development.
–jeroen
via: delphi – What’s the difference between CreateWnd and CreateWindowHandle? – Stack Overflow.
Posted in Delphi, Delphi 1, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Software Development | 2 Comments »
Posted by jpluimers on 2012/09/27
Cool: learned something new here:
About the path names of files being in the .dproj as well as in the .dpr:
@Jeroen – Looks like msbuild might need those entries, otherwise they’re possibly redundant, AFAICT… In any case, there is not much editing involved, just delete ‘dccreference’ entries and then a ‘save all’ in the IDE regenerates them. – Sertac Akyuz
–jeroen
via: refactoring – How to reorganize the folder structure of my units in Delphi? – Stack Overflow.
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | Tagged: computer, Delphi, folder structure, ide, path names, stack overflow, technology | 14 Comments »
Posted by jpluimers on 2012/09/14
Two days ago I ran into the bug below while porting some code from Delphi 2006 to Delphi XE2, posted on StackOverflow, and got solutions in very little time.
Thanks Andreas Hausladen, David Heffernan, Ken White, Sertac Akyuz, Rudy Velthuis, for answering, providing solutions and verifying!
Note that this worked up until Delphi XE, and has been fixed in Delphi XE3 (which for this project I can’t use as the client upgraded to XE2 without SA).
This is the error (it’s a Windows DLL load error marked “System Error”).
The program can’t start because mqic.dll is missing from your computer. Try reinstalling the program to fix this problem.
–jeroen
Posted in Delphi, Delphi 2006, Delphi 2007, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | Tagged: ibm websphere mq, software, stack overflow, technology | Leave a Comment »
Posted by jpluimers on 2012/09/10
Last week, ModelMaker Code Explorer 10.0.0 got released:
General new features
- Delphi XE3 / RAD Studio XE3 support
(as well as support from Delphi 5 and up)- Member Search list allows filtering on member type. Todo items are also displayed.
- Pascal, new option on tab MMX | Properties | Pascal | New Entities | Methods: Empty Parameter lists. This controls how empty method, procedure and delegate parameter lists are emitted: either suppressed – pascal style, or emitted as ( ) – c-style.
- Locate Type: displays a filtered list of previously parsed class and interface types. This is used to open the containing source file and locate a class inside the file. Default key binding Alt+Shift+T.
Solved bugs
- Text containing line breaks and stored in XML (settings, snippets) could contain stray 0x0B (#11) characters. Solved.
- An access violation at shutdown could occur in older Delphi IDEs if MMX was not docked. Solved.
- If the Delphi IDE editor buffer contains a stray #0 (which is bad in itself) would cause all kinds of exception in MMX. MMX now detects stray #0’s and abort all editing operations, displaying the line:column of the bad #0 character.
- Pascal: relative paths starting with \ (relative to root in drive) would not be handled correct. Solved
–jeroen
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Development, Software Development | Tagged: access violation, c style, delegate, Delphi, delphi 5, delphi ide, editor buffer, empty parameter, interface types, line breaks, member search, member type, new features, new option, pascal, relative paths, snippets, software, technology | 2 Comments »
Posted by jpluimers on 2012/08/14
Last week I posted an in depth answer on StackOverflow.com about the memory allocation difference in Delphi and Fortran, or more accurately in two different kinds of languages.
You have:
A very important aspect is the order of for optimized loops. For column major order, the optimum is inside out (as the inner arrays/records are in consecutive memory locations), but for row major order, it is the exact inverse.
One of the consequences is that in Fortran it is a very fast operation to pass an array of inner fields as parameter to a method.
This is what I wrote: Read the rest of this entry »
Posted in Delphi, Delphi 2007, Delphi 2009, Delphi 2010, Delphi for PHP, Delphi x64, Delphi XE, Delphi XE2, Development, Fortran, Software Development | 4 Comments »
Posted by jpluimers on 2012/07/31
Just in case you come across this error ([WayBack] QC 108189):
[DCC Error] CompilerAVUnit.pas(26): F2084 Internal Error: AV21BCE0AC-R00000000-0
I had this error in a really complicated unit that I tried to backport from Delphi XE2 to Delphi 2007 (as there was some non-unicode compliant app that needed this).
I could not find it searching for F2084 Internal Error, so I sat down and trimmed it down to the CompilerAVUnit below.
The workaround is simple: remove the static; from method Outer and it compiles fine.
I will post more details on the static keyword in Delphi in a future blog post. For now I’ll keep it at this: Read the rest of this entry »
Posted in Delphi, Delphi 2007, Development, F2084, QC, Software Development | 8 Comments »
Posted by jpluimers on 2010/05/11
This Why does this code fail in D2010, but not D7 question on stackoverflow once again shows that SizeOf on character arrays usualy is evil.
My point in this posting is that you should always try to write code that is semantically correct.
By writing semantically correct code, you have a much better chance of surviving a major change like a Unicode port.
The code below is semantically wrong: it worked in Delphi 7 by accident, not by design:
Like many Windows API functions, GetTempPath expects the first parameter (called nBufferLength) number of characters, not the number of bytes. Read the rest of this entry »
Posted in Delphi, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi XE, Delphi XE2, Delphi XE3, Development, Encoding, ISO-8859, Software Development, Unicode | Leave a Comment »
Posted by jpluimers on 2009/10/19
Operator overloading is a very nice feature of the Delphi language.
However. the Delphi documentation on Operator overloading is not completely right.
Below is my table of what I found out so far, and some notes.
It is part of my “Nullable types in Delphi” session that I gave on some conferences.
The downloads for that session contain more detailed information.
This is just an abstract to get you going and a try to answer this operator overloading question on Stackoverflow.
Download the full presentation to get more in depth information.
Let me know if you need more information.
Example:
type
TMyRecord = record
class operator Multiply(A, B: TMyRecord): TMyRecord;
end;
Combining the rules of operator and result types, you can do magical things like Dances with XML | Australian Delphi User Group Members.
Delphi 2007 fixed a number of bugs including this one: Delphi 2006 wont allow const parameters of type record within record method? – Stack Overflow.
It might be that in 2019, a new Delphi version gets assignment operator overloading: [WayBack] Operator Overloading Explained – Code Partners
Tips:
| operator | # | usage | name | cagetory | * |
| and | 2 | R := A and B; | BitwiseAnd | bit | |
| not | 1 | R := not A; | //BitwiseNot | bit | glitch: does not exist! |
| or | 2 | R := A or B; | BitwiseOr | bit | |
| xor | 2 | R := A xor B; | BitwiseXor | bit | |
| () cast | 1 | R := TValue(A); | Explicit | conversion | |
| := | 1 | R := A; | Implicit | conversion | |
| operator | # | usage | name | category | * |
| round | 1 | R := Round(A); | Round | function | |
| trunc | 1 | R := Trunc(A); | Trunc | function | |
| and | 2 | R := A and B; | LogicalAnd | logical | |
| not | 1 | R := not A; | LogicalNot | logical | |
| or | 2 | R := A or B; | LogicalOr | logical | |
| xor | 2 | R := A xor B; | LogicalXor | logical | |
| operator | # | usage | name | category | * |
| + | 2 | R := A + B; | Add | binary | |
| / | 2 | R := A / B; | Divide | binary | |
| div | 2 | R := A div B; | IntDivide | binary | |
| mod | 2 | R := A mod B; | Modulus | binary | |
| * | 2 | R := A * B; | Multiply | binary | |
| – | 2 | R := A – B; | Subtract | binary | |
| operator | # | usage | name | category | * |
| shl | 2 | R := A shl B; | LeftShift | binary | name is confusing |
| shr | 2 | R := A shr B; | RightShift | binary | name is confusing |
| – | 1 | R := -A; | Negative | binary | |
| + | 1 | R := +A; | Positive | binary | |
| dec | 1 | Dec(A); | Dec | self | |
| inc | 1 | Inc(A); | Inc | self | |
| operator | # | usage | name | category | * |
| = | 2 | R := A = B; | Equal | comparison | |
| > | 2 | R := A > B; | GreaterThan | comparison | |
| >= | 2 | R := A >= B; | GreaterThanOrEqual | comparison | |
| < | 2 | R := A < B; | LessThan | comparison | |
| <= | 2 | R := A <= B; | LessThanOrEqual | comparison | |
| <> | 2 | R := A <> B; | NotEqual | comparison | |
| operator | # | usage | name | category | * |
| in | 2 | R := A in B; | In | set |
–jeroen
Posted in Conferences, Delphi, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Development, Event, Software Development | 6 Comments »