-
Content Count
3536 -
Joined
-
Last visited
-
Days Won
175
Posts posted by David Heffernan
-
-
5 minutes ago, Lars Fosdal said:But isn't everything moving towards 64-bit?
32 bit processes on Windows aren't going away anytime soon.
It's actually not hard to change the runtime to address these issues, which can effectively be summarised as isolating threads from each other's execution contexts.
I would imagine that Emba don't do it because they perceive that the benefit is too small in comparison with other candidate developments. And remember that I'm proposing a breaking change in behaviour which always raises the bar.
Personally I feel that it's important to build on solid foundations. We've just had a huge breaking change by the killing of ARC. So breaking changes can happen. And by the token that a minority of users care about floating point, breaking changes in this area won't affect many people. And surely those that are affected would by and large appreciate the change.
-
6
-
-
12 minutes ago, Lars Fosdal said:@David Heffernan - At this point in time, would it make sense to ask EMBT to focus primarily on the 64-bit part of this?
I don't think so. It's very important that code behaves the same way for both 32 and 64 bit compilers and indeed for the non Windows platforms too.
-
5
-
-
I have noticed that the list of units that the plugin offers includes those that are loaded but not visible in the IDE. In my case this means units loaded because of visual form inheritance.
So with a base form and a derived form, suppose that you load just the derived form. Well, both of the forms are offered by the plugin even though the base form isn't visible in the IDE. Is that intentional?
-
55 minutes ago, Alberto Paganini said:Where is RefToInterFace2:=nil invoked from?
That happens when the variable is destroyed, which is when the destructor is executed.
-
1
-
-
-
1 minute ago, Lars Fosdal said:@David Heffernan - I took the liberty of splitting this off into a new thread.
I think @Marco Cantu and @David Millington should look closer at this.They both have seen the document already.
-
1
-
-
-
Yeah, that's Quality Portal, the new place for reporting bugs. I submitted loads of reports at the old place, Quality Central, and then Emba killed it, along with all the bug reports. We were asked to resubmit the reports that we cared most about. Which was a load of work that I couldn't face.
-
1
-
-
1 hour ago, santiago said:Thx. for the info!
In case you have reported this, would you mind sharing the QC issue link(s)?QC107411
But QC is dead. Or did it come back to life?
-
1 hour ago, santiago said:One thing I have noticed in the Delphi Community is that older Delphi Versions are still heavily in use. For curiosity why do you still use XE7? Is it bugs preventing you from upgrading?
For me it is not money. I have later versions than XE7. For me there is no benefit to updating. Nothing released since XE7 has any significant benefit for me. For sure there are some minor things but nothing that really makes it worth the effort.
And it is an effort for me because I have a whole bunch of patches that I apply to the RTL to address design flaws primarily in its handling of floating point. That requires bespoke code for each version and I don't currently think it is worth it.
Plus I'd have to spend some time working with multiple versions because I need to maintain recent releases of our software.
Now, if Emba did something about the very poor performance of the compiler code that dcc64 emits, I would upgrade without hesitation.
-
3
-
-
In addition to constraining the window's size, you should consider giving the user visual feedback for their attempts to resize.
Do this by handling the WM_NCHITTEST message: https://docs.microsoft.com/en-gb/windows/win32/inputdev/wm-nchittest
type TForm1 = class(TForm) protected procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; end; .... procedure TForm1.WMNCHitTest(var Message: TWMNCHitTest); begin inherited; case Message.Result of HTLEFT,HTRIGHT: Message.Result := HTCAPTION; HTTOPLEFT,HTTOPRIGHT: Message.Result := HTTOP; HTBOTTOMLEFT,HTBOTTOMRIGHT: Message.Result := HTBOTTOM; end; end;
-
2
-
-
This is really excellent. It works a treat in XE7. Thank you.
I have one very minor suggestion. I wonder if it would be prudent to add a namespace to all your unit names to avoid potential clashes. For instance, one of your units is named Main and I bet there are other packages around that use that name. With a namespace prefix you sidestep any such pitfalls.
-
2
-
-
I can't believe that spring's DI container requires all interfaces to have lifetime controlled by reference counting. I suspect that you've been given a dud steer with all this reference counting code that you've added to your data module.
@Stefan Glienke would be in a better place to give guide you. He also might be able to compile this code where I can't because I guess I'm using a different version of spring from you.
-
Can't you make a minimal example? That's so important. I can't stress highly enough how important it is to make the example minimal.
-
54 minutes ago, Mike Torrettinni said:You think start /wait project1.exe is not best solution for my problem? Better suggestion?
No. It's exactly what I said. You have to wait for the process to terminate. I was commenting that your explanation was wide of the mark.
-
1 hour ago, Mike Torrettinni said:Right?
Not really. If you want the exit code you need to wait for the process to terminate. The exit code is only available after the exit.
A GUI app doesn't attach to the console at all so it's about the consoles that are involved.
-
2 hours ago, Remy Lebeau said:In general, const applies to the thing on its left, unless there is nothing there then it applies to the thing on its right instead.
Is that is a little bit loose? Consider
2 hours ago, Remy Lebeau said:void FreeAndNil(const TObject* const &Obj);
The second const binds to what exactly? Not "the thing on its left".
-
2 hours ago, Dalija Prasnikar said:For stuffing in pointers and such... it is not appropriate, but for storing integer values that can later be used to determine appropriate action... why would that be wrong or used only in toy apps?
In Delphi I never used Tag in toy apps knocked up in minutes, because they were pretty simple, but in more complex ones, especially with dynamic content and multiple entry points for actions, tag is the most straight forward thing to use and maintain.
Also, just yesterday, I wrote a whole a lot of tag based code in native Xcode iOS application where native view also has tag property specifically used for determining which action you want to run. And there just like in Delphi you have Sender object that you can also use to determine appropriate action, but just like in Delphi code working with objects would be more convoluted and using Tag is preferred when you have to determine or change action at runtime.
I'd far sooner use Sender in an event handler to identify the control, and then have a map to anything else. Tag falls over as soon as you need to handle more than a single aspect. Plus there is no type safety.
-
1
-
-
I have never understood why Tag would ever be used. I mean I get it for a toy program knocked up in a couple of minutes. But not for real world code.
-
1
-
-
I'm sure you know how to work with list objects, and how to set the Visible property.
-
1
-
-
1 hour ago, PeterPanettone said:If you have several panels then the handling becomes expensive.
It's not at all difficult. Put them in a collection and hide all of them apart from the active one.
Has the benefit of doing exactly what you want.
-
It would be far simpler to remove the page control and tabsheet and have the panel placed directly on the form.
-
16 minutes ago, Mike Torrettinni said:Do you have a real case scenario for using the second option, TSessionID = type integer; ?
For integer, due to assignment compatibility rules of the language, the only use is to provide a distinct type identity to be used in RTTI settings. For instance if you wanted to have a separate design time property editor for this type.
-
Distinct types don't give you type safety when used with integers and strings. These distinct types are still assignment compatible. There is a use in type identity for design time property editors.
If you want type safety for assignment you'd need to wrap in a record.
-
3
-
Rethinking Delphi’s management of floating point control registers
in RTL and Delphi Object Pascal
Posted
No. That can result in a change to the floating point control state in a different thread, due to the data race on the global var.