Simplates from Mike Pasley

Simplates??!  What are Simplates? The term Simplates is the combinationof simple and templates. Simplateshelp you do very simple things. Or are just ... simple templates. Instructions are part of the templates. Or use the Simplates as examples of how you can make your very own templates from code you use repeatedly.
I'll write more documentation later. But what I have are really beta templates.

BIG, HUGE DISCLAIMER: This is not a supported product, these templates are freebies (for now).
They are not totally debugged and I have not explored all of the angles. If you benefit from these concepts and ideas, great, if not, you have been warned there is risk on your part. So proceed with caution!
Speaking of which:

Caution:  Please review the templates before making modifications. Also,  save all files that will be affected by these changes to another directory. Then make the modifications.

So what's in the Simplate Collection Set 1?

Control Templates
Calendar  (All Clarion code)
Calculator  (All Clarion code)

Extension Templates
OOP-A- Matic  (Construct OOP classes anytime, anywhere)
Simple Includer (Include your pre-built header & implementation files)

Code Templates
CreateAControl  (Create controls at runtime)
SimpleExit  (Logout, Shutdown, or Reset your WIndows 95 or 98 environment)
MapClarionProcedure (Prototype a Clarion procedure or function locally)
GlobalFunctionMapper (Prototype your function in the global map from a Dynamic Link Library)
FieldToField (Set Field Value to a Value from Another Field)
ValueToField (Set Field To A Value)
FieldToFieldWithFileLookup (Set Field Assignments to Another Field with Non-Related Lookup)
AddFileToSomethingDeepAssign (Use this template to add file records to a queue using deep assignment)
AddFileToSomething (Use this template to add file records to a queue)
FieldLookupFromFieldInQueue ('Assign any field with value from another field in a queue using some field)
SetFieldFromFieldInQueue (Set Field Value to a Value from Another Field in a Queue
SimpleLoops (Create Some Simple Loops')

If you can use one or two of these templates... great!  Some of these templates I have always wanted  included in Clarion. Please send me comments.

Download Simplates Set 1 (simplate.zip -14Kb)

Download Example 1 (exampl1.zip - 6Kb) OOP-A-Matic and  MapClarionProcedure
Download Example 2 (exampl2.app - 28Kb)  - Exit windows
Download Example 3 (exampl3.app - 53Kb) - Calendar, Calculator, loops, CreateAControl

So what is in Simplate Collection Set 2?

It contains five files including an example file (exampl4.app) that demostrates how to apply all four templates.
The templates are
SimpChek.TPL- This template allows you to check for an addtional instance of a running program with points for adding code for the running condition  or the not running condition (see example). This template is used to prevent a multiple instances of running programs. It uses a synchronization mechanism call a mutex. This is superior to finding text in a window. The template was based and inspired by Alexey Solovjev's response in the newsgroups. Thanx Alexey.

Simpctl.TPL - This template allows you to operate on all controls of the same type at runtime.
For instance, you may want to change the color property of all of your button controls at runtime (see example)

SimpDisp.TPL -  This template allows you to retrieve and use display properties such as screen width, screen height, screen resolution, and number of colors. Compile and run the example, change your display properties .in your control panel, press the Refresh button on the example app and watch what happens. This example was based and inspired by Arnor Baldvinnson from Icetips 3. Thanx Arnor.

SimpShex.Tpl - This temple allows you to use Shellexecute to launch aapplication using the associated  file. The example launches the default web browser.

Download Simplates Set 2 (simplat2.zip -12Kb)
Mike Pasley
Team Topspeed - Internet Connect
Questions? Comments?
Email MikePasley at mpasley@logicentral.com