Although I welcome the Community editions, I still think that by not including Linux support in the community and pro editions, EMBT is making a major mistake. Imagine the activity we could have had when it comes to adding Linux libs and tooling from an enthusiastic community!
But – For unit testing, this creates another predicament
We have used an RTTI trick to create a loop for each value in anon.type T for enumerations, and hence had a
type
TEnumTester
type
reference to function EnumToString(const Value: T):String;
…
end;
But there is no such way to “genericize” a helper method.
type
IEnumHelper = interface
function ToString:string;
function Description: string;
end;
I can’t declare an interface which a record helper have to adher to, as there is no syntax to do so, and I can’t constrain the generic type to match that interface
My suggestion would be to allow something like
type
TMyEnumHelper = record helper for (TMyEnum, IEnumHelper)
function ToString:string;
function Description: string;
end;
TEnumTester = class
end;
and be able to declare
var
TestMyEnum: TEnumTester;
Today the interface constraint fails with
[dcc32 Error] : E2514 Type parameter ‘T’ must support interface ‘IEnumHelper’
since the enumerated type is not recognized as having support for the interface.
I think that would have been helpful – as would a generics constraint for enumerated types be.
RSP-13746: Code Completion for compiler directives, conditional compilation. I always end up in the help files whenever I need to insert a compiler directive. It would be nice if code completion worked for directives and perhaps also conditional defines / conditional compilation switches (if/ifdef, etc)!
I wish I could tell the debugger that I don’t care about breaking on exceptions in the IndyClient thread, but only in the primary thread. I.e. ignore specific thread classes or in some other way instruct the debugger to only do break on exception (or even breakpoints) in the thread(s) of my choice.
You must be logged in to post a comment.