App Gen GUI based Template Writer - [edit] Not available for the foreseeable future

If there is enough interest from buyers, I’ll make this template available for sale - Express your interest and let me know what you think is a fair price for this.

Its all #template source code, no black boxes, so that you can use the app gen, window formatter and embed editor to write out your own templates.
A standalone clarion app which will import templates using the TXA file method so you can edit your existing templates in the app gen using this template, will be available.

Designed so noobs can write their first templates and not make any errors whilst also using the appgen.

The appgen makes it easier to navigate the different sections of a template code faster than using a (code folding) text editor. For example a #Group(%grpName,%p1Param,%p2Param) will be a procedure in the appgen, making it easier to navigate, global and local variables are template %symbols to help with scoping. The window formatter lets you lay out #Prompts so you have a GUI to visualise various templates as you write them.

Numerous undocumented or not obvious features made available in this template like the ability to call multiple #Validate statements after a #prompt and other tricks, so you can get the most out of writing your own templates, like calling dll’s to use additional screen controls.

You can use this template to write simple procedure #Extension templates, #Code templates or entire #Application templates with or without #Utility wizards which can be used write to a clarion class writing template of your own or generate code in other languages like .net (Desktop & MAUI), Android, iOS, Java or others. I have a need for these which is why I wrote this template and I’ll be writing my own templates to produce code in other languages later this year.

This works in C6 and later versions of Clarion like C11.

I’ve asked @Bruce if I can show it off on to show it in action, just waiting for an answer as I dont know what criteria exists to get on a prestigious Youtube channel :wink: and if there is interest, I’ll a do a series of short how to’s on Youtube so you can get up and running as quickly as possible to exploit the potential of the templates.

Any comments are welcome. :grinning:

Some teaser screen shots.

Global Procedure Extension section.
Multiple template family sets.
Default buttons place ABC and Clarion so you dont need to type anything.

Global Procedure Extension section.
Select the type of template you want to write. This determines the additional templates available to use so you cant use the wrong template command in the wrong place. There will be a wizard utility available to guide you through this process.

Global Procedure Extension section.
#Application prompts

Global Procedure Extension section.
#Procedure prompts

Global Procedure Extension section.
Edit. A non existent group was being called so I dont have a screen shot for the #Code prompt, but its because I dont always get error message when using a template, that I’ve had to write this template to minimise the time chasing template bugs…

Global Procedure Extension section.
#Control prompts

Procedure embeds
A #Code template for every template command that exists so you can write the code out in a format similar to using the programming language Scratch. Fill in the prompts for the template command and it displays the final output of the template line in the embed editor so you can see exactly what the code generated will look like.
You dont have to uses these as you can just write your template source code out by hand here if you so wish. Flexibility is key.

Procedure Window Formatter.
All the prompts that you can use displayed here. Choose the template control prompt you want and then fill in the prompts. Windows are sized to mirror the appgen windows where template prompts appear, so C6 is half the width of C11 for example. Exact alignment of controls placed here are performed when you exit the procedure and reload the window formatter so you dont have spend time aligning controls perfectly, just drop them on the window formatter and the next time you load the window formatter the controls will be aligned and positioned as the appgen would display them.

Procedure Window Formatter.
Two separate #button prompts to match the two different looks a #button can adopt.
Additional controls added are declared and laid out in the window formatter in a separate procedure to maintain that GUI look and feel, but you can drop to the embeds and add the prompts using handcode if you so desire.
All relevant attributes for a #Prompts are accessed by clicking on the action tab and clicking the button to access the prompt screen.

Procedure Window Formatter.
Most #Prompts can have additional PROPerty’s assigned to them, these are declared on there own tab (tab 2 PROPerty’s) and what you fill in appears in the list box on tab 2 so you can check template code as you fill in the field prompts. To future proof and in case I have missed any PROP’s which also work with templates, the last option is USer Specified where you can specify additional properties. Not all properties work with the templates, eg Prop:ReadOnly does not work with template prompts in C6 but might work in later versions of Clarion.

Procedure Window Formatter.
If you want to colourise your #prompt text or backgrounds, you can, but you have to specify a hex colour so the colour picker is shown below the field with instructions on how to get a hex colour out of the built in template colour picker as its geared for Clarion and Clarion colour equates. Again this is a property which can be assigned to a template #prompt.

Procedure Window Formatter.
#prompts can be wrapped in the #Enable statement, so the option to use #Enable is on every control #prompt, but you can wrap multiple control #prompts in the embed section for expediency. Where ever an expression is accepted, #Groups can be used to return a %True or %False value, and #groups can accept parameters so a #Group can be called in the same way you can call a procedure in the appgen. This then automatically creates a Todo procedure where you then select the #Group procedure. This also then makes that #group available to other parts of your template and you can see using the appgen where the #group is called from. I treat #groups like a procedure in the appgen.

Procedure Window Formatter.
Option box. Select the control, this adds the option box, then add as many radio buttons using the normal window formatter radio buttons. Then select the option box action tab, the radio buttons are counted and an entry made for each one to exist where their individual template prompts can be filled in.

Procedure Window Formatter.
If you select Value as the option in the Data Type in the previous screen show, the value entry field for the radio button becomes enabled forcing you to fill in a value. These templates are designed to minimise any chance of an error when writing your templates out, but I’m sure there will be room for further improvement as it gets used more and more and the odd bug might show up.

Procedure Window Formatter.
#Validate is where additional functioning can called using a #group. As its possible to call multiple #Validate statements which isnt obvious in the documentation, the list box exists so you can add multiple #Validate statements. as a #Group is treated like a procedure with optional parameters, you have the option in numerous places to call a procedure which is a #group. In the listbox you can see the line of template code which will be generated for you so you have piece of mind its generating code as you would if doing this by hand.

Procedure Window Formatter.
#Enable tab is the same standard layout on all #Prompts and #Display which can be enabled.

Procedure Window Formatter.
#Sheet control, as this is a template, changing the defaults for the prompts mean you can give you a standard look and feel to your control layouts so every time you drop a sheet control on the window, if you want them to always be a sheet with the HScroll attribute, just change the default setting in this template.

Procedure Window Formatter.
Like the Option box with Radio buttons, drop the #Sheet control on screen then add as many tabs you want using the standard window formatter tab control and the same number will be mirrored in this list for you automatically when click on the Sheet button found on the action tab. And then you can define the tab as you wish. The observant will note the procedure and parameter calling facility is missing from the Expression section. I’ve spotted a bug!

Procedure Window Formatter.
#Display control where you can add blank lines or additional text. The Prop: facility with colourised text and backgrounds come into their own here as does #Enable.

Procedure Window Formatter.
#Field Prompts to help utilise fields from the dct.

Procedure Window Formatter.
The appgen templates ensure you know when a control hasnt been completed with relevant error messages.

Procedure Window Formatter.
You cant leave a control with unfilled values. The template ensures the minimum amount of data is filled in in order to produce a valid line of template code.

Thats just a taster, without spending too much time showing it off, but like I say, if there are interested parties and buyers, please let me know and I’ll make it available for purchase, and if its something people want to see on ClarionLive or as a separate series youtube video’s let me know below.
Either way this should give code assistant AI’s a bit of a run for their money especially when I finish my language translator so I can copy code snippets from most popular languages and have them translated to another language I want.


I’m definitely interested. I’m comfortable with writing templates by hand but anything that makes easier is a good thing.

As far as the webinar is concerned, John and consultant are always looking for presenters.

I’ll post a link to this thread in Skype if you haven’t done so already.

Good job!

1 Like

I’m not on the skype group only 24hrs in the day so feel free to post a link.

I’ll look around for John (?Hickey’s?) details and see what he says, I dropped @bruce a pm to see what he said about clarionlive but I dont know who’s in charge of getting on clarionlive, I just assumed @bruce would be ok to ask.

I think Clarion’s templates are massively underestimated and I’ve written so many templates and they are getting rather large in terms of lines of code I was spending more and more time trying to locate the lines of code I needed that I was forced into writing this template because code folding in the text editor only gives me so much. This template is about 20k lines of template code so far and when its finished I wouldnt be surprised if it exceeded 50k lines and the appgen just breaks everything down into very manageable chucks. I see the appgen as a code editor on steroids plus more… :grinning:

John Hickey is the one that you talk to get on ClarionLive. And there are plenty of slots available to do a webinar.Skype is the quickest way I know to get a hold of him.
I would be interested in such a tool, and will probably more interested after I see a presentation.

I’ve just PM’ed @John_Hickey on here, pencilled in for Friday the 27th of Jan unless something major comes up.

I suppose a good question to ask is what would people like to see it do?

As its a template chain in its own right, there are addons which work with it, to further expand its functionality and capabilities.

I can show how to build a template which calls a dll to do external processes, like copy files to new locations or run a command line compiler, or bring data into the template.

I can show the template outputting code to debugview as the template is used so people can see how the template code is executing as they use the template in the appgen. This is very handing for debugging big templates.

I can show how to copy and paste existing hand coded templates into this template chain to organise, navigate and update the resulting template quicker and easier than just using the text editor. I’m already using it for that and tying up the functionality with the window formatter.

Passing parameters to groups by value and by address.

In general, its a template chain that happens to write template code so its kind of limited to one’s own imagination and what I use it for maybe different to what others are looking to use it for. Thats why I’m asking what people want to see it do? At least that way I can prep before the demo.


Jan 27th sounds brilliant Richard, and we’d love to have you on. Consider yourself booked.

Please make sure you have a headset microphone - the audio is much better than laptop mics.

Agreed! This is very cool!

This is very clever in my opinion.

Once you get that eureka moment, you wont think its that clever. :grinning:

Me too. I am a newbie/noob with Clarion templates. But I always wanted to figure out how to write them.
It’s a “template chain” in its own right seems very exciting, and able to generate Clarion or ABC Family chain templates.
Do I need to brush up on the Clarion template language?
I see there are 4 newsgroups for templates. But they are apparently on life support. Maybe this will revive them.
I see your screen shots are C6. Do you have a C11 example?
I want to get to the Eureka moment and don’t think it’s that clever.
So, should/could SV use your GUI Template Writer to better maintain their templates?
P.S. Thanks for doing this.

You should be able to create any additional templates for the Clarion or ABC templates families and create your own template families, so if you are proficient in other languages, you should be able to use this template to build a template chain for that other language.

Some knowledge is better than none, but I think the template will help guide people with no experience as they’ll be able to edit it in the appgen which is a familiar environment and IMO the appgen is predominantly what attracts people to Clarion, not knocking the language or anything, but experienced template writers can write it out freehand in the embeds if they want, they are not forced to use #code templates in the embeds. I’m copying template source into the templates and slowly recursively improving the template in the appgen as I speak.

I spend most of my day in C6, I have C11 here so I will copy them across as I’ll need to test it in C11, but C6 is my starting version as there are still people out there using different versions of clarion. They may even be backward compatible to C55 or earlier, I just havent tested it in those versions.

Its upto SV what they want to do, I wouldnt be surprised if they have their own templates to edit their templates but I’ve written this to maintain my own templates more quickly and efficiently thats the main driver for this. In my opinion whenever the templates were introduced, they were none in CPD2.1 which I started on, but there were there in CW1.5 which was the next version I jumped to, there should have been a template to edit templates in the appgen then.

Anyone should be able to use it to create new templates or maintain existing templates. Whether this template allows or caters for all scenarios with template code only time will tell. There’s some pretty clever stuff going in the SV templates in places so I cant wait to get them in to this template and have a closer look because they do jump around to different #groups quite a bit, but I’m using STRPOS in some of my templates as well mainly for validating data, but I dont think there are any good examples to show off the abilities of the template language which I think this template might do as well.

The templates will force correct syntax as per the docs where possible which should help those who are new to writing templates of whatever complexity, but I needed something to speed up maintaining my own templates as I’m increasingly spending more time hunting for lines of code or I want to do a bulk update and a search and replace makes it tedious, plus the templates force a level of standardisation with coding practices which you dont get with a text editor.

This is something I’ve had to bite the bullet with now because one of my classes is getting to big for the text editor and I’m wasting time hunting for code and making bulk updates.

Its like writing a book and then as more chapters are written, its taking longer to lookup something from an earlier chapter or make a plot/detail change in an earlier chapter. So this template should make my life quicker and easier and hopefully others. :grinning:

I’ve just told @bruce I’m pulling out of showing this template off because of my situation at home at moment, I cant even be sure I’ll be awake at the time and the day and I think most people know lack of sleep is one of the worst things to go through. The longest I’ve been awake for, doing a server upgrade was 80hrs about a decade ago, so lack of sleep is no fun to say the least. I’m in a far from ideal situation here at the moment and its only getting worse at the moment.

1 Like

Maybe you could create a short video or three at your leisure? An entire presentation is a lot to bite off.

I could but based on the suggestions for what it might be worth that I’ve had, it wouldn’t be economically viable for me to do anyway. So I’m just cracking on. I might do a video just to show what can be done, but I’ve got an 18yr old dog who is becoming very demanding in his old age amongst other things. I wouldnt be able to do a presentation if he kicked off and started barking! I can see why old people get shunted off to care homes, its to get them out of the way…

You don’t need to feel put on the spot.
This looks like it could end up being a pretty big app, and your potential customer base could possibly be pretty small for such a specialized product. The 3rd party market can be pretty tough. If you’re looking to recoup your costs and start making a dependable income, maybe this isn’t the right way to do it. And if it requires support (which I’m sure it would), then that’s an added cost/stress to you.

It doesn’t have to be all or nothing, though. You’ve already done all this work, maybe look at it another way. Maybe there are subsets of your work that could be more manageable to you, and useful to others.

Barking dogs can often be the thing that saves you. :slight_smile:

Based on conversations I’ve had, its not going to be worth doing. If I get round to it, I’ll put a youtube video up showing off its capabilities incase someone else wanted to write something similar for themselves.

Does anyone recommend a free simple to use screen capture tool to make it quick and easy to upload youtube videos?

Edit. Answered my own question when I started looking into how to do “chapters” on the youtube video timeline. Seems Youtube provide their own software for making content called Youtube Studio.
Video chapters - YouTube Help (

How to Record Your Computer Screen in Windows 10 - YouTube

Sorry to see your tool is not going to be available. Seems very promising.

Reference screen capture; I use a product called “Screenhunter” for that but it has nothing to do with YouTube. Screenhunter also allows you to record “video” captures of your screen if you wanted to do, say, instructional videos.

I use YourTube’s interface to do the uploads.


I’ll check out Screen Hunter thanks.

The TLDR is its not economically viable based on conversations I’ve had, mainly the time needed to provide support. My dog in his old age needs round the clock constant supervision at the moment which ruins sleep and if he decided to start barking constantly until he got attention, I wouldnt be able to do the presentation. So doing the youtube video would be better.

I might come to private arrangements with some people but I wont be supporting this other than bug fixing, ie I wont be teaching people how to write templates with this template, and I also want to go travelling which also means I wont be online 24/7 to provide support. I have K2 and Everest on my bucket list amongst other things and I’m not getting any younger.

Template controls appearing in embed source. Need to get the nested controls #Boxed, #Sheet & #Tab to work.

Code templates showing in source and in the embed tree, same caveat with the nested controls

Can use it for hand coding in the embeds now. Need to write the template parser to important templates into the appgen so I can work on it in the appgen to finish it off. Still finding undocumented features.
Can handle multiple templates in a single file like some template files are at the moment. Can output to an automatically incrementing build folder and then update the clarion template registry(s). Build folders let me copy a previous build back into the template registry as I’m now able to use the template in the appgen to write the template, a recursive template of sorts… :grinning:

Experimenting with “live” templates, ie write the template code in the procedure #button listbox with prompts and then it runs that template code at build time, intended use is for ad hoc functions, like calling windows api’s for extr functionality outside of the template. If I get the theory working it will make it possible to licence templates so they only work if licenced, something thought previously impossible, but these templates will need periodic internet connections to validate the template licence.

1 Like