Jump to content


Popular Content

Showing content with the highest reputation since 03/09/20 in all areas

  1. After a very, very long beta phase I finally released MMX Code Explorer V15. Thanks to all beta testers for their help and patience. A really big thank you goes to all who donated for the new MMX icons.
  2. You should probably rephrase that "and only slows me down". In my experience laziness always comes at a price. Not bothering to use descriptive identifiers saves a few keystrokes at the price of readability. ARC and GC relieves the developer of having to deal with some of the complexities of resource management, at the price of performance. Etc. I would honestly rather have good performance and full control of what's going on with the resources. Yes. Let's break COM support so we can save some keystrokes.
  3. Sherlock

    Improve the Structure Panel?

    @Fr0sT.Brutal If you have nothing substantial to contribute to a users topic please refrain from posting.
  4. mael

    HxD hex, disk and memory editor

    Well, I am sure you will understand that it's not really nice to advertise another product in a thread specifically presenting HxD. I have invested many years into it (since 2002), and it has been Freeware all the time. A little respect for that effort would be appreciated.
  5. David Schwartz

    language updates in 10.4?

    I don't care about nullables so much as a more efficient way of writing code that tests for a NIL value and stops rather than raising an exception, so you don't need to have if Assigned( xyx ) then all over the place to prevent exceptions. Nullables seem like a back-door way to get support for something that would save quite a bit of time and coding that isn't going to be added to the language just because it's really useful. There are so many idiomatic phrases we use habitually simply because the language never supported ways to avoid them originally; other languages are finally being enhanced to address things like this, but Delphi remains stuck in the Dark Ages when it comes to useful language enhancements. Like the use of strings on case statements that practically every language in use today supports, just not Delphi. Compilers are supposed to make the work of programmers EASIER. I don't subscribe to notions that "we don't do that because it's not in the 'spirit' of Pascal" or whatever. That's just BS. It's like saying you'll never put an electric starter on your cars because it's just not historically accurate with original car designs. So you have to get out and crank a lever in the front of the car to get the engine started. I don't know about anybody else, but I'm sick and tired of hearing off-the-cuff comments from managers and VPs who make technology usage decisions saying that Delphi old and stale so they can't wait to replace their code with "a more modern language". At the place I started working at in mid-January, the CTO cornered me one day after I'd been here about 3 weeks and said, "So how much work do you think it would take to replace all of the Delphi and MySQL with C# and SQL Server?" Why is this such a pervasive and recurring question everywhere I've worked for a decade? There may be something heart-warming about the fact that Delphi can compile code written in 1995, but it's keeping management teams at corporations of all sizes from embracing Delphi because there are plenty of language enhancements in C, C++, C#, Python, Ruby ... you name it, that are not in Delphi, and from all indications will never be. That gives the clear impression that Delphi is old, stale, stodgy, and is something nobody wants to use because it has no support fo the latest language features that other languages have. For 12 years now, I've worked at one place after another where my job was to keep a bunch of legacy Delphi code alive until they can replace it with "something more modern". That's THEIR words, not mine! And I have absolutely no defense for it. They use the Pro version of Delphi, not Ent or Arch, because they don't use any of the other stuff bundled with the bigger packages. Just the language and a few 3rd-party component libs (mostly free stuff). There are other tools that implement Pascal variants that are almost totally compatible with Delphi, and add plenty of new language features that are on-par with contemporary languages. These prove it can be done elegantly and cleanly. But the compiler builders need the motivation to do it. If the folks who own Delphi ever hope to get it mainstream again, they need to bring the language into the 21st century and add features that most other contemporary languages have had for a while now. But when the topic comes up, all we ever hear is crickets. "Oh, but look at all the work we've done with our latest Interbase enhancements!" There's lots and lots of work being done enhancing stuff that hardly anybody uses. But enhancements to the core product are nowhere to be found.
  6. Cristian Peța

    Set a PC environment based on a Country name..

    Don't use date as string in SQL filters. Pass dates as parameters. That calendar component should give you the date as TDate or something, not string.
  7. Uwe Raabe

    Looking for long term partners/investors

    According to the 80/20 rule, whereas 80% of the work can be finished in 20% of the time, you actually have spent 15% of the time needed to get 100% of the work done
  8. Uwe Raabe

    Test your product with UTF-8 beta setting

    For new units you can enforce that with this registry setting (example for Delphi 10.3):
  9. The purpose of a class constructor is to initialize the class to a known initial state when it's created. Imagine having to different ways to start your car if you were alone or if you had passengers, just so the system that supports airbags knows whether to only activate the Driver's-side airbag or all of them. Airbag activation based on secondary properties that can't be known until run-time (ie, how many people get into the car) is not part of the object's "initial state". FIRST you start the car. THEN you do other things like activate the airbags. You do NOT want to have different ways of starting the car based on factors that depend upon secondary systems. It doesn't need to be airbags -- it could be A/C vs. Heater; driving in the day vs. at night where lights are required; etc. Creating your objects is like starting the car and getting the engine running. C++ and C# (among others) have a way to inject initial state data into constructors at the time of declaration vs. run-time. Delphi doesn't have that ability, so you need to inject the really core initial parameters in the Create call, and then add others AFTER the object has been initialized via property injection.
  10. Angus Robertson

    Internationalized Domain Names (IDN)

    SVN and the overnight zip have been updated with a lot of changes so ICS supports International Domain Names for Applications (IDNA), i.e. using accents and Unicode characters in domain names. Domain names can only contain lowercase ASCII letters and numbers and a couple of symbols, so Unicode U-Labels (nodes in a domain) must be converted to A-Labels (Punycode ASCII) with an ACE (ASCII Compatible Encoding) prefix. So www.mâgsÿstést.eu becomes www.xn--mgsstst-pwa1e4l.eu and мособлеирц.рф becomes xn--90aijkdmaud0d.xn--p1ai. ICS mostly does the Unicode to A-Label conversion just before looking up an IP address for a domain name (in DnsLookup) and converts back from A-Label to Unicode when doing a reverse lookup (in ReverseDnsLookup). HTTP headers also contain A-Labels for the Host: header and the host part of URLs for proxy or relocation, but Unicode paths should be UrlEncoded by the application as now. Not looked at SMTP yet. The HTTP client and server, Ping, ICMP and DNS Query components all now support Unicode domain names, generally without application changes unless you want to display the A-Label name looked-up (PunycodeHost property). DNS Query does require application changes due to all methods and properties previously being AnsiString, now String. SSL/TLS now fully supports Unicode domain names, including displaying the Unicode version of the domain name (except for Subject and Issuer lines), and X509 automatic certificate ordering from Let's Encrypt fully supports Unicode domain names. Certificate files are saved with Unicode names, not A-Labels. For server testing I registered an eu domain which is live on one of my web sites at https://www.mâgsÿstést.eu/ and https://scrúdú.mâgsÿstést.eu/ which have ICS ordered SSL certificates. I do have DNS for Cyrillic and Far East domains, but this web server is built with Delphi 2007 so no full Unicode. Angus
  11. Lars Fosdal

    language updates in 10.4?

    No feature freeze until Delphi Antarctica
  12. Uwe Raabe

    Interface Completion

    In case you give MMX Code Explorer a try: it has an Extract Interface refactoring. Given this class declaration type TMyClass = class private FNewProp: Integer; function GetNewProp: Integer; procedure SetNewProp(const Value: Integer); public procedure NewMethod; property NewProp: Integer read GetNewProp write SetNewProp; end; select the property and method in the members view of the MMX Code Explorer window and in the context menu select Refactorings - Extract Interface. In the following dialog enter the interface name, GUID etc. and you end up with this: IMyInterface = interface(IInterface) ['{8431B2B9-8D15-4308-BF08-26AB2BA4960F}'] function GetNewProp: Integer; procedure NewMethod; procedure SetNewProp(const Value: Integer); property NewProp: Integer read GetNewProp write SetNewProp; end;
  13. Rollo62

    Preventing iOS to lock screen

    In Fmx this would look somewhat like this: function DoLocked(const ALock : Boolean) : Boolean; var UIApp : UIApplication; begin UIApp := TUIApplication.Wrap(TUIApplication.OCClass.sharedApplication); if ALock then begin UIApp.setIdleTimerDisabled(True); // aquire wakelock Result := True; end else begin UIApp.setIdleTimerDisabled(False); // release wakelock Result := False; end; end; I put some more functionality around that basic one, to make it workable on all platforms, and to avoid double-enabling, but I removed that from the code above.
  14. Vandrovnik

    Stop IDE from writing unit names all by itself ?

    May be it will be easier to define empty System.Actions unit for Delphi XE than to fight with Delphi RIO (put it in a directory, where XE will search, but RIO will not).
  15. Remy Lebeau

    ANDROID64 Conditional compiling

    You can hexdump each compiler EXE to see which conditional symbols are actually available. That is what I do sometimes.
  16. Rollo62

    Test your product with UTF-8 beta setting

    Thanks god the new managements didn't kill all old references in code and IDE as first step, causing all kinds of weired issues.
  17. Have a look into the KastriFree project from Dave Nottage.
  18. David Heffernan

    'stdcall' for 32-bit vs. 64-bit?

    As discussed above the conditional code simply adds clutter for no benefit. The compiler has already handled the issue for you. Remove the conditional, and let the compiler ignore stdcall in x64. A second point is the use of the export directive. It is also always ignored (a hangover from 16 bit days). Again it should be removed. Therefore the best practise would be to write: procedure MyProc; stdcall; And that's it. Obviously you still need the exports list somewhere.
  19. I like my constructors to construct No loading, no process, no fancy stuff inside the constructor other than parameter assignment, variable initialization or other class creation.
  20. Having arguments to the constructor is something I try to avoid. TINIComparer = class private fINIFileName1: string; fINIFileName2: string; protected procedure LoadINIFiles; procedure CompareINIFiles; virtual; public constructor Create; virtual; procedure Compare(const aINIFileName1, aINIFileName2: string); end; TIniComparer2Way = Class(TIniComparer) protected procedure CompareINIFiles; override; // if necessary public constructor Create; override; end; constructor TINIComparer.Create; begin Inherited; end; constructor TINIComparer.Compare(const aINIFileName1, aINIFileName2: string); begin fINIFileName1 := aINIFileName1; fINIFileName2 := aINIFileName2; LoadINIFiles; CompareINIFiles; end; constructor TINIComparer2Way.Create; begin Inherited; fCompareType := cmt2WayCompare; end; // from main form: fINIComparer := TINIComparer2Way.Create; fIniComparer.Compare(edtINIFilename1.Text, edtINIFilename2.Text)
  21. I do create my files with BOM too, and additionally try to keep existing status when loading alien documents. That way, all parties should be happy. I try to follow these rules: File has BOM --> Keep BOM File without BOM --> Keep without BOM Create my own file --> Always use BOM
  22. Uwe Raabe

    MMX for Delphi 10.3 Rio

    @Jacek Laskowski and @ULIK Can you please try the new version
  23. David Heffernan

    language updates in 10.4?

    The eternal optimist
  24. Anders Melander

    Generics and Classes on Windows 2000 = OOM

    FWIW, Windows 2000 isn't supported by the version of Delphi you're using. Also, please read the event log message again. It has all the clues: It isn't your application that is experiencing an "out of memory" error. It's Windows that is experiencing an "out of virtual memory" error. To fix it: Increase the size of the page file. My guess is that the W2K system has a fixed size page file - or no page file at all. Otherwise it would just increase the size automatically - or maybe that feature was added later. I forget. and who cares anymore. If you're really interested in why you get a windows error and not an application error, read some books on Windows internals and the virtual memory manager, or just google it.
  25. Allen@Grijjy

    ANN: Find leaks in Delphi and C++ with Deleaker

    Been experimenting with it myself and there are things I like. I will give a full report on it once they address some things I reported.