Changing a WebApp to App

I have a project built as a WebApp and I’ve decided it should be a native application. Is there an easy way to refactor the project in place? Or am I better off creating a new project, then copying & pasting methods & properties from one project to the other?

You can’t. The project types are exclusive.

I am just going through this heartache. Copy and paste methods and properties works fine, but you need to redo all the Windows and controls all over again. At the start I tried search and replace In the text version of xojo source files to replace webtextfield with textfield and so on for all controls but it became too hard to do so I just rewrote.

Take your time to redo the UI, then copy and paste methods and properties, then implement even handlers and copy the logic from the web controls.

There are some syntaxic differences, you will have to adapt code.

I have done it several times the other way from Desktop to Web, but the principles remain.

I use External Modules to hold all code that is shared between my desktop and web apps.
Where there is an interface element involved (eg list, textfield, textarea, etc), I pass it as an Object to the shared method then get the one method to handle it differently whether a desktop or web based object inside #TargetDesktop and #TargetWeb frames.

This allows me to debug both desktop and web code at the one time.