PeterPanettone 157 Posted August 9, 2020 In the Delphi 10.4 STRUCTURE PANEL, I select a TCard container control (containing several controls) and try to copy it to the clipboard with CTRL+C. It does not work. Even in the EDIT sub-context menu, the Copy item is disabled: Restarted the IDE. Tried again and again. Can anyone confirm this further annoying IDE bug? Share this post Link to post
Mike Torrettinni 198 Posted August 9, 2020 (edited) I don't know if this worked for you in the past, but it never did for me. Same as for TPageControl, you have to create a new page/card, and copy/move all controls from old page/card to new one. I actually use 10.2.3 not 10.4. Edited August 9, 2020 by Mike Torrettinni Share this post Link to post
PeterPanettone 157 Posted August 9, 2020 17 minutes ago, Mike Torrettinni said: I don't know if this worked for you in the past, but it never did for me. Same as for TPageControl, you have to create a new page/card, and copy/move all controls from old page/card to new one. I actually use 10.2.3 not 10.4. Thank you for the confirmation. Could there be a WEIRD DIABOLIC PURPOSE of a sick Embarcadero developer mind behind this malfunction? Share this post Link to post
Mike Torrettinni 198 Posted August 9, 2020 18 minutes ago, PeterPanettone said: Could there be a WEIRD DIABOLIC PURPOSE of a sick Embarcadero developer mind behind this malfunction? I don't want to imagine anybody sick, weird and diabolic working on Delphi 🙂 Share this post Link to post
PeterPanettone 157 Posted August 9, 2020 6 minutes ago, Mike Torrettinni said: I don't want to imagine anybody sick, weird and diabolic working on Delphi 🙂 That's the moment when the fear of your own imagination increases the suspense in good horror movies. Share this post Link to post
Cristian Peța 103 Posted August 10, 2020 I tried to Copy-Paste. It's working for me in 10.4.0. Share this post Link to post
PeterPanettone 157 Posted August 10, 2020 (edited) 7 minutes ago, Cristian Peța said: I tried to Copy-Paste. It's working for me in 10.4.0. From your screenshot, you copied a TCardPanel. Not a TCard. Edited August 10, 2020 by PeterPanettone Share this post Link to post
Cristian Peța 103 Posted August 10, 2020 You are right, sometimes is working sometimes not. But manual copy from text I think is working always. Switch back to "View as Form" and Paste on an other TCard. Share this post Link to post
PeterPanettone 157 Posted August 10, 2020 3 minutes ago, Cristian Peța said: You are right, sometimes is working sometimes not. Didn't somebody recently say that computers are DETERMINISTIC? https://en.wikipedia.org/wiki/Determinism 6 minutes ago, Cristian Peța said: But manual copy from text I think is working always. As long as you have only a button on the TCard, this is easy. Try that with MANY controls and sub-containers on the TCard... Share this post Link to post
Uwe Raabe 2057 Posted August 10, 2020 Basically it is working! It is just that sometimes the Structure View context menu (or the actions behind it) seems not to be properly updated. After opening the context menu from the IDE Designer, the Structure View context menu is working again. Qualifies for a QP entry I think. Share this post Link to post
PeterPanettone 157 Posted August 10, 2020 8 minutes ago, Uwe Raabe said: After opening the context menu from the IDE Designer, the Structure View context menu is working again. You are almost right: After showing the EDIT context menu directly in the Form Designer (right-click on a visual control in the Form Designer) the "Copy" item is enabled. Then showing the EDIT context menu for the same control in the Structure Panel shows the Copy context menu item still enabled but it is not working when clicking on it or when pressing CTRL+C! Therefore, the trick to copy a TCard with all its sub-controls is as following: 1. In the Form Designer, if the TCard is not visible because covered by a full-size control (e.g. a TPanel), click that TPanel and press the ESC key until the TCard is focused. (Look in the Object Inspector). 2. Then press CTRL+C to copy the TCard together with all its sub-controls to the clipboard. General rule: To copy a complex object structure, don't use the faulty Structure Panel but use the Form Designer! Share this post Link to post
PeterPanettone 157 Posted August 10, 2020 Alternative solution: 1. First select the TCard in the Structure Panel 2. Then click on the Form Designer's TAB to focus the TCard in the Form Designer 3. Then press CTRL+C to copy the TCard together with all its sub-controls to the clipboard! Share this post Link to post
PeterPanettone 157 Posted August 10, 2020 (edited) The FUNDAMENTAL BUG here is that with specific controls like TCard (is that a TControl?) the control is synchronized (and therefore focused) in the Object Inspector BUT not in the Form Designer. I suspect that the causal chain does not go directly from the Structure Panel to the Form Designer but in this way: Structure Panel → Object Inspector → Form Designer and that Object Inspector is the real culprit for the chain interruption for containers like TCard. This is a typical bug that occurs when the complexity of the interacting objects surpasses the developer's capabilities in mastering this complexity. Edited August 10, 2020 by PeterPanettone Share this post Link to post
Anders Melander 1783 Posted August 10, 2020 1 hour ago, PeterPanettone said: This is a typical bug that occurs when the complexity of the interacting objects surpasses the developer's capabilities in mastering this complexity. Would it be possible for you to restrict your comments to the technical details of the problem? You know nothing about the circumstances that caused this problem and it's not like it's a showstopper. Share this post Link to post
PeterPanettone 157 Posted August 10, 2020 12 minutes ago, Anders Melander said: Would it be possible for you to restrict your comments to the technical details of the problem? You know nothing about the circumstances that caused this problem and it's not like it's a showstopper. Please calm down. Everything is OK. You are being loved and we like you. Share this post Link to post
vfbb 285 Posted August 10, 2020 This problem is old, it is at least 2 or 3 years old. Share this post Link to post
PeterPanettone 157 Posted August 10, 2020 1 hour ago, vfbb said: This problem is old, it is at least 2 or 3 years old. I fear it is MUCH OLDER. Shall we call it PREHISTORIC? Share this post Link to post
PeterPanettone 157 Posted August 10, 2020 Eureka: I have found a solution at Stack Overflow: https://stackoverflow.com/questions/63336038/from-the-ides-structure-panel-how-to-copy-a-tcard-to-the-clipboard/63338826 Please vote for it! 1 Share this post Link to post
vfbb 285 Posted August 10, 2020 4 hours ago, PeterPanettone said: Eureka: I have found a solution at Stack Overflow: https://stackoverflow.com/questions/63336038/from-the-ides-structure-panel-how-to-copy-a-tcard-to-the-clipboard/63338826 Please vote for it! Yes. Sorry, I forgot to tell, I do the same. This occur randomly with any control. I believe they didn't fix it because it doesn't seem easy to replicate. Share this post Link to post
PeterPanettone 157 Posted August 10, 2020 1 hour ago, vfbb said: I believe they didn't fix it because it doesn't seem easy to replicate. If true, this would confirm my complexity hypothesis. (See above). Share this post Link to post