David Heffernan 2366 Posted 22 hours ago 1 hour ago, dormky said: Then please explain ? I delphi, I write to a variable that is then monitored to close the form. In Window, I call a function. Those two things are completely different. Imagine if you would read documentation. Like that for EndDialog. And imagine if the documentation for EndDialog said this: EndDialog does not destroy the dialog box immediately. Instead, it sets a flag and allows the dialog box procedure to return control to the system. The system checks the flag before attempting to retrieve the next message from the application queue. If the flag is set, the system ends the message loop, destroys the dialog box, and uses the value in nResult as the return value from the function that created the dialog box. So yeah, it's exactly the same as the Delphi mechanism. Because that's how modal dialog are implemented in Windows. 2 Share this post Link to post
dummzeuch 1542 Posted 20 hours ago 2 hours ago, dormky said: There's a reason Delphi is a dead language Not that again! Just remove the f*ck*** call to Close and be done with it. 2 Share this post Link to post
Brandon Staggs 322 Posted 20 hours ago (edited) 16 minutes ago, dummzeuch said: Not that again! Just remove the f*ck*** call to Close and be done with it. But, the language is dead because he doesn't have to call Close. If he removes the call to Close and suddenly everything works the way it was designed to, then the language may come back to life. Sounds dangerous. Edited 19 hours ago by Brandon Staggs Share this post Link to post
dormky 3 Posted 6 hours ago 15 hours ago, David Heffernan said: Imagine if you would read documentation. Like that for EndDialog. And imagine if the documentation for EndDialog said this: EndDialog does not destroy the dialog box immediately. Instead, it sets a flag and allows the dialog box procedure to return control to the system. The system checks the flag before attempting to retrieve the next message from the application queue. If the flag is set, the system ends the message loop, destroys the dialog box, and uses the value in nResult as the return value from the function that created the dialog box. So yeah, it's exactly the same as the Delphi mechanism. Because that's how modal dialog are implemented in Windows. Yes, but the difference is that the flag is internal. We do not have access to it, nor is it the same as the value returned by ShowModal call. Again, to close in Windows I call function. In Delphi I set a flag. Fundamentally different things. Share this post Link to post
Anders Melander 1851 Posted 6 hours ago 25 minutes ago, dormky said: Again, to close in Windows I call function. In Delphi I set a flag. Fundamentally different things. Yes, yes, we see now. How could we have been so blind? Totally different things. Totally! Now, run along. 1 Share this post Link to post
Lajos Juhász 303 Posted 3 hours ago 2 hours ago, Anders Melander said: Yes, yes, we see now. How could we have been so blind? Totally different things. Totally! Instead of running away from this terrible problem. Anders you should write a class helper to help to solve this gigantic bug in the design. I mean how can we live and use Delphi knowing that it has this very poorly design in the fundamental part of the VCL. Share this post Link to post
Anders Melander 1851 Posted 3 hours ago Just now, Lajos Juhász said: Instead of running away from this terrible problem. Anders you should write a class helper to help to solve this gigantic bug in the design. I mean how can we live and use Delphi knowing that it has this very poorly design in the fundamental part of the VCL. I dunno. I think it's pointless. I mean, properties? Pfft! What's the point? Delphi is dead anyway and if there's one thing the past 30 years has shown it is that the design is flawed beyond repair but we were just too ignorant to notice. If only we had been told about this before. The shame is unbearable. 1 Share this post Link to post
dormky 3 Posted 3 hours ago Hey, bad design doesn't mean it's not useful. I still use a car whose AC is less powerful then a fart lol. Share this post Link to post
Sherlock 668 Posted 3 hours ago Luckily Delphi isn't the only IDE out there. Freedom of choice is a thing. Share this post Link to post
PeterBelow 245 Posted 2 hours ago 23 hours ago, dormky said: Heavy disagree. A message/event driven environment should, you know, actually use events instead of mixing in state monitoring. The VCL has to work in the API environment that Windows provides. So aim your criticism at Microsoft ;). Share this post Link to post
David Heffernan 2366 Posted 1 hour ago 5 hours ago, dormky said: Yes, but the difference is that the flag is internal. We do not have access to it, nor is it the same as the value returned by ShowModal call. Again, to close in Windows I call function. In Delphi I set a flag. Fundamentally different things. Windows API can't expose a flag directly so has to provide a function to set it. You are incapable of learning, no wonder this is so hard for you. Share this post Link to post
dummzeuch 1542 Posted 1 hour ago 24 minutes ago, David Heffernan said: You are incapable of learning, no wonder this is so hard for you. OK, now we go into the domain of personal insults. Share this post Link to post
Sherlock 668 Posted 50 minutes ago Yeah, I feel the question has been answered. Everybody should now move on...nothing to see here. Share this post Link to post