Monday 14 May 2012

Project Templates

A number of my Real Studio projects have required me to add things such as a Windows menu, for the open windows in a project, and a "Open Recent" menu.
Now while it isn't a bother to create these for each project, I began to think that there must be a better way to spend my time, rather than coding the same thing over and over.
Fortunately, Real Studio allows the use of project templates. In fact, any Real Studio user has already seen the project templates when they start up Real Studio. But what may not be apparent is that you can also add your own templates. It is a very simple process:


  1. Create your skeleton project
  2. Save it in the Project Templates folder within the Real Studio folder


And that is it.

What I have now done, is created some extra projects templates for some common scenarios I come across. I would also be possible to add things such as About windows, or even a skeleton Settings window. If you find yourself using the same custom controls repeatedly (like I do with my own NumberEdit control), then simply create a default project containing the controls and save it in the Templates folder.
I would, however, recommend not changing the existing projects. There may be a time when you need the bare bones that Real Studio offers you, but that is not a problem. As far as I can tell, the IDE will allow as many project templates as you would like.

Here is a quick shot of the Real Studio New Project window on my Mac to demonstrate this. I have highlighted my custom project templates:

No comments:

Post a Comment