Der schöne Günther 316 Posted October 30, 2018 (edited) The IDE offers to relocate a class to another unit by right-clicking under "Refactoring" but - surprise! - it never works. Does MMX have this feature? I see it has elaborate ways to add to an existing class or even move things around within the class declaration. But so far, I have not been able to find anything that allows me to move a class (declaration and implementation) to another unit. Is that correct? Edited October 30, 2018 by Der schöne Günther Share this post Link to post
Jasocul 0 Posted October 30, 2018 (edited) You can use C&P from unit to unit in the mmx-explorer. And after all a delete in the mmx-explorer for the old unit. Edited October 30, 2018 by Jasocul Share this post Link to post
Alexander Elagin 143 Posted October 30, 2018 Select the class declaration (either in the MMX tab or in the editor) and then do a simple right click - MMX commands - Clipboard - Cut entity (in the source unit), then go to the target unit and perform MMX Commands - Clipboard - Paste entity. Share this post Link to post
Georgge Bakh 29 Posted November 21, 2018 On 10/30/2018 at 1:45 PM, Alexander Elagin said: Select the class declaration (either in the MMX tab or in the editor) and then do a simple right click - MMX commands - Clipboard - Cut entity (in the source unit), then go to the target unit and perform MMX Commands - Clipboard - Paste entity. Will all code which used the entity also be updated automatically? Share this post Link to post
Uwe Raabe 2064 Posted November 21, 2018 Can you give an example what you mean by "updated automatically" in this context? Share this post Link to post
Georgge Bakh 29 Posted November 21, 2018 (edited) For example, some third unit3 used TClass1 from the unit1 from which we moving TClass1 to unit2. In order to keep the code correct we need to update unit3 accordingly. Edited November 21, 2018 by Georgge Bakh Share this post Link to post
Uwe Raabe 2064 Posted November 21, 2018 12 minutes ago, Georgge Bakh said: For example, some third unit3 used TClass1 from the unit1 from which we moving TClass1 to unit2. In order to keep the code correct we need to update unit3 accordingly. No, you have to add unit2 to the uses clause of unit3 manually. You might also be able to remove unit1 from the uses clause. Share this post Link to post