Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-11

Re: Interface scope incompatibility with Delphi

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dimitri Smits
----- "Graeme Geldenhuys" wrote 10 lines
Hi, Attached is a simple console application that outputs a hierarchy of log information. Under Delphi 7 we used to use a TInterfacedObject descendant to track the call stack. This same trick was very handy for changing and restoring the mouse cursor too.

I still use that trick daily in Delphi: the cursor handling stuff, that is. It makes it possible to keep the code readable without cluttering it with extra (explicit) try/finally and try/except blocks.

what I DON'T do is use it like in your example, Graeme. I always assign the result to a local variable, which goes out of scope in an implicit finally 't tried if this does (not) work in fpc though.

as for the codesite stuff, there is an open source (& free as in beer) variant for that as well with a Delphi interface. Maybe it can be made portable as well to fpc and x-platform.

http://tracetool.sourceforge.net/

kind regards,
Dimitri Smits

Reply by email