Jump to content

Roger Cigol

Members
  • Content Count

    303
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Roger Cigol

  1. Roger Cigol

    Form still on display when property Visible = false

    Going back to my original problem I am suspicious of the library issue. One reason for this is when I explicitly add the library path D:\Program Files (x86)\Embarcadero\Studio\22.0\lib\win64\debug to my project the problem still happens but seems to be much rarer. Over the next few days (weeks?) I am going to try removing this path and running again to confirm that this statement is true (sometimes it takes an hour or more for the problem to appear). I will also try running it in "release" mode. If there is a release library being chosen for some reason that doesn't match a debug library (is this possible?) then a release mode build might be expected to run perfectly. This will take some time...... Remy is absolutely correct here
  2. Roger Cigol

    Form still on display when property Visible = false

    STOP PRESS - I now know (from info direct from Embarcadero) that it is not possible to single step into VCL on a Win64 C++ project with RAD Studio 11.2. Delphi and Clang64 use different debuggers in this case.
  3. Roger Cigol

    Form still on display when property Visible = false

    If I compile my simple sample project (C Code Hide Show 64) with static linking for either Win32 or Win64 with the Project | options | C++ shared options | Library path complete empty it still builds, links and runs ok. Somehow the linker must know about the library file path..... How can I tell which path it is using ? (maybe my original problem is due to the wrong libraries being linked in?). Answer by looking at the TwineCompile console output. The Linker part of this is as follows Linking... Target _PerformLink: Target _PerformBCCILink: d:\program files (x86)\embarcadero\studio\22.0\bin\ilink64.exe -G8 -L.\Win64\Debug;"d:\program files (x86)\embarcadero\studio\22.0\lib\win64\release";"d:\program files (x86)\embarcadero\studio\22.0\lib\win64\release\psdk";C:\Users\Public\Documents\Embarcadero\Studio\22.0\Dcp\Win64;C:\Users\Public\Documents\Embarcadero\Studio\22.0\DCP\Win64\Debug;C:\Users\Public\Documents\Embarcadero\Studio\22.0\Dcp\Win64 -j.\Win64\Debug;"d:\program files (x86)\embarcadero\studio\22.0\lib\win64\release";"d:\program files (x86)\embarcadero\studio\22.0\lib\win64\release\psdk";C:\Users\Public\Documents\Embarcadero\Studio\22.0\Dcp\Win64;C:\Users\Public\Documents\Embarcadero\Studio\22.0\DCP\Win64\Debug;C:\Users\Public\Documents\Embarcadero\Studio\22.0\Dcp\Win64 -l.\Win64\Debug -v -Gn -aa -Tpe c0w64w memmgr.a sysinit.o .\Win64\Debug\Project1.o .\Win64\Debug\Unit1.o .\Win64\Debug\Unit2.o , .\Win64\Debug\Project1.exe , .\Win64\Debug\Project1.map , rtl.a vcl.a import64.a cp64mt.a , , .\Win64\Debug\Project1.res So I can see that, even though the library path is empty, the library files paths are being passed to the linker. But why is the first path in the -L switch a "release" path ? Is this why the single stepping into Hide() is not working?
  4. Roger Cigol

    Form still on display when property Visible = false

    I think this question is becoming "how do I step (debug) into the VCL in C++ VCL Windows 64bit project. I am on Windows 10 - RAD Studio 11.2 with patch 1 I have created a simple dummy VCL C++ project. Set static linking. Set "use debug dcus". If I target Win32 I can single step into VCL (eg breakpoint on Hide() in line 22 of unit2.cpp. Clicking on the IDE step into button leads me into the VCL code where it sets the property Visible to false. All good. If I compile for Win64 when I get to the break point it breaks but this time the IDE step into button just steps over the Hide() function. Library path is strange. For windows 64 it uses the same default path: $(BDSLIB)\$(PLATFORM)\debug but this is greyed out for Win64 (indicating that it is not a valid path). My installation is on my "D:" drive. I think these macros equate to D:\Program Files (x86)\Embarcadero\Studio\22.0\lib\win64\debug. This directory exists and looks as if it has all the files I expect. If I explicitly add this path ( D:\Program Files (x86)\Embarcadero\Studio\22.0\lib\win64\debug) to the library paths it appears not-greyed-out (ie it is valid). But no change to behaviour when I try to step into Hide(). If it needs this library path to build the exe I don't understand how it manages to build without it being there. Maybe the "greyed out" library path is valid ? Project source (no exe) as a zip file attached. C Code Hide Show 64.zip
  5. Roger Cigol

    Form still on display when property Visible = false

    I am not certain that I've single stepped into the VCL code before. But it doesn't seem to be working. Can anyone advise what I am missing, please? I have set project | options | Delphi compiler | compiling | use debug .dcus to true (all the options in this "debug" section are set to true or to their highest level) I have done a project "clean" I have compiled (ie full build) the Clang64 code with "debug" settings. When I run the code (under the IDE) it does stop at breakpoints ok. I wait for my code to get to the "faulty" state (ie with the form on the screen and Visible property set to false). I hit my recently added extra button and it breaks at my break point in the OnClick event handler ok. I can confirm that the "this" value matches the displayed value on my form. The event handler has the single line of code: Hide(); I now try to single step INTO this function and it just jumps over to the end of the event handler, rather than going into the VCL pascal which is what I was expecting (and wanting) it to do.
  6. Roger Cigol

    Form still on display when property Visible = false

    Hi Remy - it's a 64 bit app - but other than that your advice is (as always) a good idea of what to try next. Thank you. I already have another "debug aid" button who's on click handler calls Hide() - and this doesn't cause the form to go away in this fault condition (it does "hide" it (ie make it non-visible) when i click on it when it is all working and expected to be visible)). This will provide a convenient entry point for the stepping as you describe. Might be a challenge to follow the thing through but I'll give it a go.
  7. Roger Cigol

    Form still on display when property Visible = false

    Hi Brian, A good point (and accurate). But I think I am happy that this is not the problem because the same underlying message approach is used to update the form contents and on the "visible but Visible = false" form there is a tick counter being displayed (in TrashEdit->Text) and this IS seen to be updating. Also a debug aid button on the form works - in it's OnClick event I reset the trash counter to zero and this happens when I click it. I think this all means there is no block on the main VCL message loop.
  8. Roger Cigol

    Form still on display when property Visible = false

    I have confirmed that the break point IS on the actual object being observed. void TTestStatusForm::DealWithState(void) { String IsVis = Visible ? String("Yes") : String("No"); Trash1Edit->Text = String(reinterpret_cast<__int64>(this)) + String(" Ex: ") + String(TrashExCounter) + String("Vis: ") + IsVis; if (!IsBusy) {// skip if still active from last tick IsBusy = true; try { DealWithStateMachine(); // !!! delete this ! int Trash = TrashEdit->Text.ToIntDef(0); Trash++; TrashEdit->Text = String(Trash); } catch (...) { // we don't want to lock up with IsBusy = true TrashEdit->Text = String(-999999); TrashExCounter++; } IsBusy = false; } } Trash1Edit is the blue box across the top of the screen shot. - DealWithState is called very 20ms (and the TrashEdit counter under the comment // !!! delete this is seen to be counting upwards). You can see that the status is showing that Visible = set to false and yet the form is still visible (hence I could do the screen shot). Note that the screen shot does not show the TrashEdit counter (this is off to the right) but this does count up.
  9. Roger Cigol

    Form still on display when property Visible = false

    Hi Remy, Thanks for taking an interest here. You are right about limitation of code snippet but it's very difficult to give a "complete" example since I don't know what bits are required to make it "complete". Your guess is a very sensible lead. I think I need to add a display of the "this" address of the form - then I can check when I debug with a break point and confirm (or otherwise) that I am in the correct object. I will try to do this tomorrow.
  10. Roger Cigol

    Button with changing image

    Or have two buttons in the same position on the screen and make only one visible at any one time....
  11. Roger Cigol

    Use of dynamic control names

    In C++ this is easy to do, provided you ensure that the five buttons are all in order in the header file for the form class. You then declare a pointer to the first button and then iterate through the series of buttons, incrementing the pointer each time until you reach the last button. Not sure of the equivalent in Delphi but I suspect there is one! I use this technique a lot. I listen to (and value) my learned colleagues advice here. It is correct. I have ran into this packing problem with structures / classes. This approach is "dodgy". As recommended below : need to create an array of pointers and iterate through this. Thanks to Remy and Sherlock for the benefit of their expertise.
  12. Roger Cigol

    Rad 12 Beta - Link to News

    From a C++ perspective there are some really positive advances being talked about for version 12. But we wait to see (read the disclaimer) how much actually makes it into the official release. Delphi users may feel C++ is not important. I think the opposite. For the long term survival of the product Embarcadero must increase their customer base and having a good Firemonkey multidevice solution based on C++ is one obvious way to help achieve this.
  13. Roger Cigol

    Migrate an old app in Delphi 2009 to modren C++

    Hi Remy, I am interpreting "Delphi Units" to mean source code from the original Delphi project that Alkanium has been asked to convert to C++...... As always, what you say is correct.
  14. Roger Cigol

    Migrate an old app in Delphi 2009 to modren C++

    What Brian Evans says is true for RAD Studio (where you have both C++ Builder and Delphi). If you only have C++ Builder version you cannot use Delphi units in your project (although it does, as he correctly states) still use Delphi for all the VCL RTL etc.
  15. Roger Cigol

    Migrate an old app in Delphi 2009 to modren C++

    I'm not sure I totally agree here. Yes, if you use an automatic translation then old bugs will be converted to C++. But if you think whilst rewriting AND add unit testing for modules AND refactor if/when there are obvious weaknesses in the existing Delphi code structure then you can end up with a better system. But you need to be aware that it's a big task.
  16. Roger Cigol

    Migrate an old app in Delphi 2009 to modren C++

    I don't know of anything that attempts to automatically translate delphi source code into C++. But Embarcadero RAD Studio C++ can use all the Embarcadero components that Delphi can use so if you use Embarcadero C++ you only have to (manually) translate the Delphi source codes specific to your project(s) into C++. I say "only" - this could still be a significantly complicated task. One bit of advice I always offer someone starting a new s/w project is to answer the question "how am I going to test it?" before you start. ("it" is both the overall project and each individual source code section).
  17. Anyone out there who is an Embarcadero C++ Programmer based in the UK (ideally SW England) with interest in engineering applications ? We could do with working with one (full time?)
  18. ...But it is all very preliminary. Embarcadero state: "Please note that all comments and statements about potential new features are subject to change and should not be relied on until the GA release of a product is available."
  19. ...or very few Embarcadero C++ are using Delphi Praxis
  20. Once this is up and running C++ builder may "come alive" again. I am cautiously optimistic !
  21. Roger Cigol

    Where is the link to register to the forum?

    Count me in as a volunteer too, if needed.
  22. Roger Cigol

    Where is the link to register to the forum?

    This problem is always going to be with us. But we do need to keep the forum open. New members = new blood = new ideas. Without new members the forum has signed it's own death warrant (even if it is a slow death).
  23. Roger Cigol

    Are local TGUIDS preinitialized?

    Writing a compiler is VERY complex. Speaking as someone who doesn't write compilers, I myself would be cautious about criticising my colleagues in the industry who do, particularly when given an explanation that does make some kind of sense (as in this discussion). I certainly agree with @Dalija Prasnikar there is nothing worse than a compiler warning that is wrong. It is hard to make them "go away" and they definitely can "hide" other useful warnings.
  24. The use of a 64 bit application talking to a 64 bit database is the one time I've found where the IDE being a 32bit app is a real pain. What it means is you can't use the same database settings for design time as you use for run time (and doing so is a really convenient feature when you develop 32 bit apps). I work on a large PostgreSQL project and PostgreSQL is only available as a 64bit database (and has been so for a long while - you have to go back several versions to get a 32 bit version). I just accept that I can't use the design time connectivity of FireDAC and just do all my debugging at runtime. It's not so convenient but I've got used to it!. Be sympathetic to the Embarcadero Team - changing the IDE to 64bit must happen but they need to make sure that there are 64bit versions (or equivalents ) for all the sub components (which come from many many places : just look at the IDE menu item: Help | About | Acknowledgements). It's not quite as straightforward job as you think. You also have the issue that it "breaks" all the design time features for the folk out there using FireDAC with 32 bit apps talking to 32 bit databases. These may well be used to seeing all the design time connection functionality.
  25. I've just noticed that there is no mention of the Delphi Coding Boot Camp 2023 on this Forum. Seems strange that no one else is aware of this! Delphi Code Boot Camp 2023
×