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 https://www.clarionlive.com to show it in action, just waiting for an answer as I dont know what criteria exists to get on a prestigious Youtube channel 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.
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.