How to Work with Templates
Posted: Wed Oct 10, 2012 7:08 am
I understand the concept of templates, in that you can use them as
starting points for yet another project or file, and you hold the
basics of what you intend to do or what you want to start with and
just go from there.
I believe I have it down that the PBI extension is used to identify
which files are templates, and that you have several PREFS files
under %APPDATA%\PureBasic\ where settings are stored, first for
PureBasic (PureBasic.prefs), Templates (Templates.prefs) and
Tools (Tools.prefs). However, on my setup, I am missing
Tools.prefs, and the Templates.prefs file only has 17 bytes in it.
If I look at Tools/Templates in the IDE, it is a blank.
How do I move on to the next stage, of having Template files
recognized and show up in the IDE as Template files? I read
that if you call the compiler with /T <template file> on the
command line, that the compiler can treat with this type of
file, but I don't know what it will do it, and from Windows,
you don't usually have command line parameters to pass on
that way (unless you add them under Properties in a desktop
shortcut).
I've tried to research this online and in the forums, but I find
no real discussion or answers related to Templates. Maybe
somebody can fill in some of the blanks here. It would be
appreciated. Oh, as an addition, I did find and download what
is referred to as the PureBasic Standard Template Library. That
you can find online at several places.
starting points for yet another project or file, and you hold the
basics of what you intend to do or what you want to start with and
just go from there.
I believe I have it down that the PBI extension is used to identify
which files are templates, and that you have several PREFS files
under %APPDATA%\PureBasic\ where settings are stored, first for
PureBasic (PureBasic.prefs), Templates (Templates.prefs) and
Tools (Tools.prefs). However, on my setup, I am missing
Tools.prefs, and the Templates.prefs file only has 17 bytes in it.
If I look at Tools/Templates in the IDE, it is a blank.
How do I move on to the next stage, of having Template files
recognized and show up in the IDE as Template files? I read
that if you call the compiler with /T <template file> on the
command line, that the compiler can treat with this type of
file, but I don't know what it will do it, and from Windows,
you don't usually have command line parameters to pass on
that way (unless you add them under Properties in a desktop
shortcut).
I've tried to research this online and in the forums, but I find
no real discussion or answers related to Templates. Maybe
somebody can fill in some of the blanks here. It would be
appreciated. Oh, as an addition, I did find and download what
is referred to as the PureBasic Standard Template Library. That
you can find online at several places.

