xsharp.eu • transferring a module from one project to another
Page 1 of 2

transferring a module from one project to another

Posted: Fri Nov 03, 2023 11:39 am
by Komar
Hi all
In the project XIDE, when you right-click the mouse, it is possible to export the module to '.VIMEF', but I have not found anywhere how to import it. Please tell me how to transfer a module from one project to another.

Re: transferring a module from one project to another

Posted: Fri Nov 03, 2023 12:43 pm
by wriedmann
Hi Komar,
I have searched now to, and could not find anything.
To not stop your work: cou can copy the prg file simply from one project folder to another one, and then use the "Add" menu choice to add that file to your project. I'm doing that very often.
Wolfgang

Re: transferring a module from one project to another

Posted: Fri Nov 03, 2023 3:31 pm
by Komar
Wolfgang, thanks for the advice. Of course, I saw how to add a '.prg' file to the project. However, I was hoping for a hint: how to add the entire module, together with the window designer object or menu editor.

Re: transferring a module from one project to another

Posted: Fri Nov 03, 2023 4:07 pm
by wriedmann
Hi Komar,
if you copy also the .wed file, it is automatically added.
And then you can add a designer.prg file with the option in the context menu.
I'm doing that very often when copying windows or tab pages in the same application.
Wolfgang

Re: transferring a module from one project to another

Posted: Fri Nov 03, 2023 4:32 pm
by Chris
Guys,

Sorry, thsi is indeed not very intuitive, but in order to import a module, you need to select Create New File, then in the new file dialog choose the button at the left bottom, "Load Template". Then pick the exported module and select it.

Now that I am thinking about it, I have no idea why I implemented it in such a complicated way... :)

Re: transferring a module from one project to another

Posted: Fri Nov 03, 2023 4:46 pm
by Komar
Chris, thank you. Everything worked out. It's impossible to guess on your own.

Re: transferring a module from one project to another

Posted: Fri Nov 03, 2023 5:16 pm
by wriedmann
Hi Chris,
if you are thinking about a better possibility to handle the import of a module, a function to duplicate an existent module would be very helpful and a timesaver.
As I described before in this thread, currently I'm working around be copying files around and renaming them.
Wolfgang

Re: transferring a module from one project to another

Posted: Sat Nov 04, 2023 4:12 am
by Komar
Wolfgang, thank you. The method you suggested for adding a module to a project works and is simpler than using '.VIMEF'.

Re: transferring a module from one project to another

Posted: Mon Nov 06, 2023 6:04 am
by Chris
Hi Wolfgang,
wriedmann wrote: Fri Nov 03, 2023 5:16 pm
if you are thinking about a better possibility to handle the import of a module, a function to duplicate an existent module would be very helpful and a timesaver.
As I described before in this thread, currently I'm working around be copying files around and renaming them.
This sounds like a very good idea for a plugin :)

Seriously, I think it's better if you just implement this functionality in your plugin, as you can make it work exactly as you like this way...And then share your plugin so others can use it as well (I am still using yours for opening the Bin folder of a project!). But if you prefer, I can implement it in base XIDE as well, just please let me know exactly how you want it to work, should it just create another file, like file2.prg in the same folder as the source file and add it to the same app?

Re: transferring a module from one project to another

Posted: Mon Nov 06, 2023 6:14 am
by wriedmann
Hi Chris,
of course I can add it to a plugin.... but I think it would be better to have it in the core version of XIDE (or, if you think is it better, I can write it in a plugin and you can deliver that with XIDE).
IMHO the best way would be to implement it in the right click menu in the project treeview as "duplicate module" and then either ask for the new name, or simply add it with a " (2)" behind the name like the Windows Explorer does. Then the user/programmer could rename it and move it to the target folder.
It seems to be relatively easy, and could save time (specially when working on Windows Forms forms or VO style Windows).
Wolfgang