Jump to content

Stefan Glienke

Members
  • Content Count

    1428
  • Joined

  • Last visited

  • Days Won

    141

Everything posted by Stefan Glienke

  1. Stefan Glienke

    Constructors + Destructors in class helpers?

    Inheritance of helpers is not solving the problem at all - you then still can have the case where you would want to use methods from 2 different helpers which cannot inherit from each other. The only solution is to make not only the last visible helper usable but treat conflicting methods via overload resolution - just like extension methods in C# do.
  2. Stefan Glienke

    Using GetMethod functions in the .NET COM interop

    You want to get some method via reflection - thats why you asking for calling GetMethod_5. Now that one requires you to pass the signature via an array of types. What are you going to do with that? Obviously you want to then invoke that method, no? But in order to do that you then need to pass the parameter values for that particular overload - what are those? You need to have some - ask them for their type (GetType)
  3. Stefan Glienke

    Linux Support on Pro Edition

    This example shows how bad it is that the Delphi compiler does not actually warn about assignment of differently sized ordinal types but instead silently truncates them. (FPC has a flag for that). If it did chances are very high you would have found it immediately.
  4. Stefan Glienke

    Using GetMethod functions in the .NET COM interop

    And that is what I don't think because it is said in that answer that you cannot call static methods via COM - but I agree that putting all that code into the C#/.NET side and just call it might be easier. Edit: You obviously want to call the method that you are trying to get and pass the parameters to it that you need the types for - so ask those instances that you are planning to pass to the method for their type.
  5. Stefan Glienke

    Using GetMethod functions in the .NET COM interop

    https://stackoverflow.com/a/1395915/587106
  6. Stefan Glienke

    Using GetMethod functions in the .NET COM interop

    Probably by calling Type.GetType(string)
  7. Stefan Glienke

    Marshmellow

    Delphi ecosystem in a nutshell. Sell things that are available as open source in other languages. Not judging - just observing.
  8. Stefan Glienke

    Constructors + Destructors in class helpers?

    Took me 10 seconds to try it out. Ctor can be added, dtor not (E2295). Which makes sense if you think about it. Adding a different way to create new instances depending on if the helper is there or not is not a problem. But not how existing instances are being destroyed.
  9. Stefan Glienke

    Forked VSCode for Delphi

    I guess you are a bit naive in your assumption of what it takes to get from something like VSCode to a fully featured IDE like RAD Studio or Visual Studio... Because otherwise why is there still that thing called Visual Studio that MS is putting significant resources into it if they could slap a few extensions onto VSCode?
  10. Stefan Glienke

    MMX Beta 14.1 available

    One of the reasons I never really got into MMX despite everyone telling me that it is a must have was its overloaded UI with all the toolbars and stuff after you installed it. Yes, you can turn off most of it but it would really pleasant if there was a simple option to switch between something like a "light" and "full" version easily (or even more different presets) - possiibly selectable during setup.
  11. Stefan Glienke

    Limit to reactions

    Recently I'm in desperate need of the facepalm reaction...
  12. Stefan Glienke

    Exclude already read posts

    I would really appreciate the possibility to not having already read posts that I did subscribe or comment on to pop up again whenever there is a new comment. I know this is how forum software usually works however it gets very distracting if content that I decided is uninteresting to me keeps popping up again.
  13. Stefan Glienke

    Exclude already read posts

    And these topics even keep popping up in terms of marking them bold on the overview when only comments by ignored people were written - very annoying. While G+ was certainly not perfect the way notifications worked was fine except the impossibility to get notified on topics without leaving some dummy comment.
  14. Stefan Glienke

    Exclude already read posts

    No, I want an opt-in, not an opt-out.
  15. Can you tell which classes it considers? For example I have the interface unit in a package and many different DLL projects that implement this interface but not all of them or even none is being opened in the IDE. Is there the possibility to tell the plugin to consider certain directories with sources in them?
  16. Stefan Glienke

    What does "G" in GExperts mean?

    That reminds me of googling for PosEx without adding Delphi to put it into context...
  17. Stefan Glienke

    Delphi compiler need to be opensourced

    If this thread is only a small foreshadowing of how the community (or rather individuals) would react and respond to an open source project and how things are getting discussed I have to say that I would not want to be part of it. Yes, everyone is permitted to his own opinions but the how is important - and I can see in other communities like for example the C# compiler or .Net Core projects that developers don't want to deal with bs and toxic waste but communicate in a civilized manner. ... and that coming from me known as someone who can voice his opinions in a strong way garnished with cursing often enough ...
  18. Stefan Glienke

    Delphi compiler need to be opensourced

    Nooo! You can't stop this before it complies to godwin's law 😉
  19. Stefan Glienke

    Delphi compiler need to be opensourced

    It is: https://llvm.org/docs/ExceptionHandling.html
  20. Stefan Glienke

    Wow, first time using repeat ... until

    I was tempted yesterday to use it until I figured out how to get the same result (also codegen wise with as little jumps as possible) using loops in a kinda readable way. 😉
  21. Yes, you can do - however using DI with interfaces has a unique benefit in Delphi - you don't need to care for who is responsible for cleaning up. Leaving aside circular references and assuming a topdown object graph you can simply pass down dependencies even to more than one consumer and stuff gets cleaned up properly in the end. Without that you need to track who is the one owning a dependency and responsible for destroying it - possible but more complicated. In GC languages however having only one implementation for an interface (which you might want to do in Delphi because of the aforementioned reason) is considered a code smell by some - see https://blog.ploeh.dk/2010/12/02/Interfacesarenotabstractions/
  22. Stefan Glienke

    Initialize local variables at declaration

    https://quality.embarcadero.com/issues/?jql=text ~ "inline variable" and affectedVersion in ("10.3 Rio"%2C "10.3 Rio Release 1") and status not in (Resolved%2C Closed)
  23. Stefan Glienke

    Initialize local variables at declaration

    IDE tooling does not work properly and some of it completely stops, Also inline variables of a managed type are not always properly initialized. As much as I like this feature syntax wise - I would stay away from it for now 😞
  24. Stefan Glienke

    Initialize local variables at declaration

    This was implemented 10.3 via inline variables. It however is not possible to declare the variable in the old way plus initialize it - you have to declare it inline: procedure DoSomething; begin var MyVar: Integer = 23; // end; You can even omit the type there and it will automatically be Integer: procedure DoSomething; begin var MyVar = 23; // end; See http://blog.marcocantu.com/blog/2018-october-inline-variables-delphi.html
  25. Stefan Glienke

    Rio 10.3.1 IDE Compiler Error

    Look for code that uses type inference - if that only happens with DUnitX config, then look for Assert.something calls
×