-
Content Count
1428 -
Joined
-
Last visited
-
Days Won
141
Everything posted by Stefan Glienke
-
Constructors + Destructors in class helpers?
Stefan Glienke replied to David Schwartz's topic in RTL and Delphi Object Pascal
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. -
Using GetMethod functions in the .NET COM interop
Stefan Glienke replied to Dave Nottage's topic in Windows API
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) -
Linux Support on Pro Edition
Stefan Glienke replied to Alexander Elagin's topic in Delphi IDE and APIs
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. -
Using GetMethod functions in the .NET COM interop
Stefan Glienke replied to Dave Nottage's topic in Windows API
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. -
Using GetMethod functions in the .NET COM interop
Stefan Glienke replied to Dave Nottage's topic in Windows API
https://stackoverflow.com/a/1395915/587106 -
Using GetMethod functions in the .NET COM interop
Stefan Glienke replied to Dave Nottage's topic in Windows API
Probably by calling Type.GetType(string) -
Delphi ecosystem in a nutshell. Sell things that are available as open source in other languages. Not judging - just observing.
-
Constructors + Destructors in class helpers?
Stefan Glienke replied to David Schwartz's topic in RTL and Delphi Object Pascal
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. -
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?
- 29 replies
-
- delphi ide
- delphi
-
(and 2 more)
Tagged with:
-
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.
-
Recently I'm in desperate need of the facepalm reaction...
-
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.
-
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.
-
No, I want an opt-in, not an opt-out.
-
Is there a way to jump to implementing classes in delphi RAD Studio?
Stefan Glienke replied to dummzeuch's topic in Delphi IDE and APIs
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? -
That reminds me of googling for PosEx without adding Delphi to put it into context...
-
Delphi compiler need to be opensourced
Stefan Glienke replied to AlekXL's topic in RTL and Delphi Object Pascal
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 ... -
Delphi compiler need to be opensourced
Stefan Glienke replied to AlekXL's topic in RTL and Delphi Object Pascal
Nooo! You can't stop this before it complies to godwin's law 😉 -
Delphi compiler need to be opensourced
Stefan Glienke replied to AlekXL's topic in RTL and Delphi Object Pascal
It is: https://llvm.org/docs/ExceptionHandling.html -
Wow, first time using repeat ... until
Stefan Glienke replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
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. 😉 -
Prefer composition over inheritance for code reuse?
Stefan Glienke replied to Edwin Yip's topic in Algorithms, Data Structures and Class Design
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/ -
Initialize local variables at declaration
Stefan Glienke replied to PeterPanettone's topic in Delphi IDE and APIs
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) -
Initialize local variables at declaration
Stefan Glienke replied to PeterPanettone's topic in Delphi IDE and APIs
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 😞 -
Initialize local variables at declaration
Stefan Glienke replied to PeterPanettone's topic in Delphi IDE and APIs
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 -
Look for code that uses type inference - if that only happens with DUnitX config, then look for Assert.something calls