Jump to content

uligerhardt

Members
  • Content Count

    87
  • Joined

  • Last visited

Community Reputation

18 Good

Technical Information

  • Delphi-Version
    Delphi 2007

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. uligerhardt

    Tool to sort units used in project by dependency

    This would only apply if we're rearranging the used units inside a pas file. My question is about the project file, where you typically don't have much code.
  2. uligerhardt

    Tool to sort units used in project by dependency

    Probably you both are right and I'm asking too much. FWIW: I don't want the units in the order they are first needed, just - as far as possible - dependent units after the units they use. If i find time I'll try to go with PAL's list and check if it makes a difference in compile time.
  3. uligerhardt

    Tool to sort units used in project by dependency

    These are not mutually exclusive. E.g. PAL gives something like BusinessLogicA ThirdPartyA MyBaseStuffA BusinessLogicB ThirdPartyB MyBaseStuffB which satisfies the first bullet. I'd like to have ThirdPartyA ThirdPartyB MyBaseStuffA MyBaseStuffB BusinessLogicA BusinessLogicB which satifies both criteria. I guess this would be some kind of stable sorting based on the original uses order.
  4. I'd like to sort the units used in our projects (*.dpr/*.dpk) by dependency. (I hope for faster compilations.) Are there tools to do that? PAL from Peganza outputs an "Optimal uses list" but that is rather "untidy" - e.g. third party units, my base units and the "business logic" all mixed together.
  5. Seems like an array should be the way: type TMyFields = array[1..4] of TField; procedure TForm1.FormCreate(Sender: TObject); var LFields: TMyFields; i: Integer; begin for i := Low(TMyFields) to High(TMyFields) do LFields[i] := Query.FieldByName('FIELD' + IntToStr(i)); end;
  6. Is this the cross-platform development I keep reading about? 😎
  7. uligerhardt

    Surprising behavior of .ToUpper

    Turkish has two kinds of I - one with dot and one without. Their case-handling is special. See Dotless I - Wikipedia.
  8. uligerhardt

    {$define} broke the IDE :)

    For me editting $DEFINEs and $IFDEFs sometimes breaks syntax highlighting - everything after the directive is colored like a preprocessor directive. (But I'm still on XE6)
  9. uligerhardt

    Set a default parameter for a function??

    If you don't want to change the order of parameters you can use two overloaded functions like this: interface function GetWeekDates(const GivenDate: TDateTime; const SOWDay: string; out startDate, endDate: TDateTime): Boolean; overload; function GetWeekDates(const GivenDate: TDateTime; out startDate, endDate: TDateTime): Boolean; overload; implementation function GetWeekDates(const GivenDate: TDateTime; const SOWDay: string; out startDate, endDate: TDateTime): Boolean; begin //... end; function GetWeekDates(const GivenDate: TDateTime; out startDate, endDate: TDateTime): Boolean; begin Result := GetWeekDates(GivenDate, 'SU', startDate, endDate); end; Alternatively, drop the overload and use different names like GetWeekDates and GetWeekDatesEx.
  10. uligerhardt

    UsesCleaner: Consider case for grouping?

    I see - thanks for the info, Uwe. And for all the useful tools. 🙂
  11. In our app we have some DXF related units whose names start with "Dx" or "DX". We also use DevEx and they have lower case "dx". So I'd like to have dx* case-sensitively grouped as third-party but left D* alone. Is there an option to make UsesCleaner do that?
  12. uligerhardt

    UsesCleaner: Retain comments in uses clause?

    Thanks for the info, Uwe - I already suspected this. Fortunately, it's not a big problem.
  13. Hi all, I recently started using UsesCleaner and mostly love it. One mildly annoying aspect is that it removes comments after units in the uses clause. I often have clauses like uses Unit1, // PALOFF - to suppress false positives from Pascal Analyzer Unit2, // used because of some obscure reason Unit3; // TODO remove when ... and have to reinstate all the comments after using UsesCleaner. Is there a way to make UsesCleaner leave the comments in place?
  14. uligerhardt

    Testers needed for GExperts Instant Grep expert

    Next nitpick: If the Instant Grep window is focussed, pressing Shift-Alt-S brings up the Grep submenu. If I dismiss it (by clicking somewhere else) the expected Grep dialog shows.
  15. uligerhardt

    Testers needed for GExperts Instant Grep expert

    MInor issue: Clicking the "Case sensitive" checkbox doesn't update the search.
×