Jump to content


Popular Content

Showing content with the highest reputation on 03/11/20 in all areas

  1. 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.
  2. 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
  3. Uwe Raabe

    MMX for Delphi 10.3 Rio

    @Jacek Laskowski and @ULIK Can you please try the new version
  4. 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.
  5. Stefan Glienke

    language updates in 10.4?

    VS is also not perfect but their compiler and language design is rock solid - yes, if you look into C# communties there are also people complaining that stuff is not C#-ish and that but the number of times where the C# compiler just craps itself, kills the entire IDE or simply produces completely wrong code is like several orders of magnitudes less than with Delphi.
  6. pieomy00

    What is the best way LoadFromFile & Thread? (FMX)

    this is main scene (form) and using ~500MB ram. I wanna add 2. scene but have only 150 MB left (for iphone 6) on 2. scene I can not pre-load textures (150 mb dosen't enough for pre-load) and need load textures runtime for this
  7. Cristian Peța

    FastReports VCL 6 - worst ever installation experience

    It's easy with Web Installer. In menu Tools->Manage Platforms... Do you installed from ISO?
  8. I prefer that, too. The matter is just if we should write a BOM or not. In regular Windows INI files it won't work. In tMemIniFile it will. In XML it's optional. In Linux it is frowned upon because everything is supposed to be UTF8. In Windows every text is some flavor of ANSI unless it has a BOM.
  9. pieomy00

    What is the best way LoadFromFile & Thread? (FMX)

    This is my scene, I have 5 enemy and have 25 different skin (sprite animation), when someone is down I need to respawn with new skin. Can not load all skins to ram, very high usage (and iphones crash if you over limits https://stackoverflow.com/questions/5887248/ios-app-maximum-memory-budget ) I have to load sprites on runtime from file smoothly. Need help for this. Thank you.
  10. Stefan Glienke

    Generic class

    public new is not overriding - that's similar to reintroduce - if you want to override, you write *drumroll* override I would even guess the CLR to be clever enough to devirtualize it entirely
  11. Stefan Glienke

    Generic class

    How about you write the code in a proper way: using System; public class TTest1 { public void Test() { Console.WriteLine("TTest1.Test"); } } public class TTest2: TTest1 { public void Test() { Console.WriteLine("TTest2.Test"); } } public class TTest<T> where T: TTest1, new() { public static void TestIt() { var FTest = new T(); FTest.Test(); } } public class Program { public static void Main() { TTest<TTest2>.TestIt(); } } The reason FPC does it different is because its generics are behaving more like C++ templates. However for generics there is no kinda "duck typing" or prototyping. You tell the generic class "look there is the type parameter T, which is guaranteed to be a TTest1 and it has a constructor". So when the compiler generates the AST for the generic type it just takes from these informations and so it decides to emit a static call to TTest1.Test because that is not a virtual method. This is the behavior in all languages with generics that I know of (such as C# or Java) - languages that use a templating approach such as C++ and possibly FPC does it similar decide what to call when the type parameter is being specified. Generics in this case behave the same way as if you would write code like this: procedure TestIt(const t: TTest1); begin t.Test; end; here it will always call TTest1.Test and not TTest2.Test even it t is a TTest2 - simply because there is no polymorphism happening due to the lack of a virtual method call. Personally I would rather call this a bug in FPC - but again it depends on the actual language specification/implementation. Both have their pros and cons. I cannot find the official specification for generics in FPC about this specific point to verify.
  12. Primož Gabrijelčič

    BackgroundWorker stopping app closing

    You are missing a reproducible test case 😉 Sincerely, I have no idea. If the example works for you (you tested it, probably?) and the application doesn't, you'll have to find what that difference is.
  13. Serge_G

    BDE Enterprise installer and Windows 10

    Hi, You are not alone 😉 even if BDE is largely obsolete I still have some fights with it. My suggestions to use it in a MS UAC environment (from Vista and more) : Don't use "program files" folders, install it in a root base directory (i.e. c:\borland\BDE) After install change some options : NET DIR directory (configuration/native/Paradox SHAREMEMxx values (configuration/system/init) (check this document for values) Last, don't forget to put Object/Options/ save for use with windows 3.1 and windows 95/NT << yes this can be a bit strange and prove obsolescence, as far as I understand this indicates BDE to find IDAPI32.cfg file and not in registry , as you certainly knows registry, UAC and users are not very friendly Installing BDE ? I use a setup I found with one of my older Delphi version (D2010 I think), but some installers (don't know if it's legal) can be found on the web i.e here or there be aware that BDE installer from Code Central need IDE to be installed on the PC I use version 5.0.1, note : last version was 5.2 I think I can't understand this, Firedac is much more than BDE ! Ok, if they still use paradox, db tables but wow ...
  14. Vandrovnik

    What is the best way LoadFromFile & Thread? (FMX)

    I think loading bitmaps can be run in a thread: http://docwiki.embarcadero.com/RADStudio/Rio/en/Multi-Threading_for_TBitmap,_TCanvas,_and_TContext3D
  15. I try to ensure that all my text files have a BOM and are encoded as UTF-8.
  16. Angus Robertson

    Internationalized Domain Names (IDN)

    It seems those using non-English domains hedge their bets on their sites: Handshake done, error #0 - SSL Connected OK with TLSv1.2, cipher ECDHE-RSA-AES128-GCM-SHA256, key auth RSA, key exchange ECDH, encryption AESGCM(128), message auth AEAD ! VerifyResult: ok, Peer domain: мособлеирц.рф 3 Certificate(s) in the verify chain. #3 Issued to (CN): mosobleirc.ru Alt Domains (SAN): mosobleirc.ru, www.mosobleirc.ru, www.мособлеирц.рф, www.новый.мособлеирц.рф, мособлеирц.рф, новый.мособлеирц.рф Issued by (CN): Let's Encrypt Authority X3, (O): Let's Encrypt Expires: 11/05/2020 18:43:06, Signature: sha256WithRSAEncryption Does anyone have any working Far East web sites with IDNs, Chinese, Japanese, etc, those I've tried are all dead. Angus
  17. Arnaud Bouchez

    language updates in 10.4?

    The main change about the language would be the full ARC removal. The memory model is really part of the language, to my understanding. It is just as vital as to operate with "class" itself. Pure unfair FUD trolling remark: managed records are available in FPC trunk since a few months, and I guess EMB doesn't like to be behind an Open Source compiler. 😉 We implemented Nullable types using variants, and integrated support in our ORM. It has the advantage on working since Delphi 6, with low overhead, and good integration with the pascal language. See http://blog.synopse.info/post/2015/09/25/ORM-TNullable*-fields-for-NULL-storage - back from 2015!
  18. 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.
  19. Stefan Glienke

    Main menu

    Might it be worth considering restructuring the Main menu which is getting longer and longer and organize the items in sub items to clean it up?
  20. Uwe Raabe

    Dependency Analyzer command line

    Yes. The command line application is named MMT_UDA. It expects at least the file name of the dependency project (.mmdep) and the report type (-uses, -cycles or -ldp). For LDP reports the output file name is taken from the .mmdep, but for other reports you must specify that name as a third parameter.
  21. Anders Melander

    Main menu

    Yes but that also removes the stuff I use and which actually works (mostly): "Find References" and "Rename".
  22. aehimself

    What to do when Commuunity Edition expires?

    As far as I remember (I am not allowed to use CE anymore, unfortunately) you can request a new license for CE somewhere on the website after logging in.
  23. dummzeuch

    Main menu

    I think you are talking about different "main menus" here. 😉 @Stefan Glienke Yes, it's getting larger (which annoys me too sometimes), but do you really use all the experts? You could simply disable those you don't use which removes them from the menu. Organizing it into submenus would be a major change since currently the menu is built by enumerating all the experts and adding an entry for all that are active. Feel free to submit a feature request though. One day I might get bored enough to do it or maybe somebody else does it and submits a patch.
  24. RussellW

    WuppdiWP Question

    I'm not sure this is the right forum, but here goes. I use Daniel Wolf's wuppdiWP as my welcome page and I have installed it in 10.3 but have an issue: when I create a new favourite or rename one as soon as I try to enter a name it acts like a search not an edit. It's not critical as I can edit teh ini file, but is annoying. Any ideas? Thanks
  25. Uwe Raabe

    language updates in 10.4?

    Actually I don't need new broken stuff at all - regardless of existing bugs being fixed or not.