Free Clarion Templates
It solves a problem wth date entry fields with picture @D7 in Clarion 5.5 and later. In clarion 5.0 and earlier, if you entered one or two digits and pressed tab, the run time library interpreted them as "day", and automatically added the current month and year, a very useful feature. With 5.5 and later, the same digits are interpreted as "month" causing lots of protests from users used to the previous behaviour.
This template works around the problem by changing the field picture to @D5 while the field has focus, and back to @D7 when the user leaves it. It's a Global template, so you populate it once and it fixes all your date fields in all your windows. It fixes all the @D7 forms (@D07, @D7-, etc.).
A small class which allows to write code like this in Clarion:
D.INIT(DUMMY) D.SELECT('C.CategoryName AS CATEGORY',| 'P.ProductName AS PRODUCT'... D.FROM('Categories C INNER JOIN Products P ON C.CategoryID = P.CategoryID .... D.WHERE('O.ShippedDate Between ''19970101'' AND ''19971231''') D.GROUPBY('C.CategoryName, P.ProductName') D.ORDERBY D.GO LOOP D.NEXT IF ERRORCODE() THEN BREAK. STOP(D.C('PRODUCT')&D.C('Sales')) D.DEEP(QRY) STOP(QRY.CATEGORY&' '&QRY.SALES) ...
- Easy to convert QA queries to clarion
- Converts SQL dates to Clarion Dates
- Columns available by column name D.COL('ColumnName')
- Query Result can be assigned to a group or queue D.DEEP(GroupName)
In a project, I needed to let the user choose which company to log to, and each company was in a different folder. I added a droplist to the login form, stored the path in a session variable, and developed this template to change the data path of all used files in the application. It should be added as an extension to the Nettalk object in the WebHandler procedure.
Path Variable (no \ at end)
Checkbox 'Is a session variable'
List of files to exclude
Checkbox 'Disable this extension'
It uses PROP:Name to change the path of each file when the working thread is started. As files usually are threaded, this redirection only lasts for the life of the thread. This way, the netweb server can serve data from multiple folders as requested by each user/session.