IMHO: Use AI to help refine your class (Not write it), use capesoft class/templates to add template support to you class. Easy Peasy!
I donāt use AI with Clarion, but I am very wary of it making up answers. I came across this video recently which gives some tips to help AI be more usefulā¦
https://www.youtube.com/watch?v=EH8Mdx948Kw&list=WL&index=4
Hereās another one by the same guy, that I enjoyed watchingā¦
https://www.youtube.com/watch?v=JSsXhd1a8z4&list=WL&index=3
There are heaps of these tips available, hopefully AI starts to get less obsequious?
In your app add a new procedure.
When the prompt comes, change from the Wizards tab to the templates tab.
SourceClass is just under source.
When you have the procedure in the app, Change the module name to something like MyClassName.clw.
The template creates the inc and clw files, but not much more
Iāve also made an alteration to the template to extend it to create the class name and allow you to create methods. If you want that just email me or private message me here. sample below.
Its not a threaded class so doesnt need the construct and destruct methods. If the class is to be threaded, youāll need to add those methods.
Its just a basic class so wont be calling in those addonās you possibly need/use.
Of course, but I was just pointing out Windows can do case sensitive and where a variety of OSāes exist in a network, its something that could be encountered especially when WSL is in use.
Although MS say two components need to be enabled for WSL2 here, in practice, Hyper-V is installed by default so IF you want to use the VMware workstation Intel VT-x/EPT and AMD-V/RVI virtualisation engine, there are some extra steps to perform to disable Hyper-V which is detailed here
Hi Rich,
I compiled this app but I get similar errors like I was getting with the AI generated class files. See line 28. Can you help me understand this? I compiled the app file and the clw an inc files are in the LibSrc folder.
Thanks,
Jeff
I cant unfortunately, Iāve noticed alot of my code only seems to work on my machine and no where else, its been like that for years now which is why Iām out of business.
CONSTRUCT and DESTRUCT are not specifically for use in a THREAD class.
They just work a little differently in that they are fired every time a new Thread is started, which creates a new instance of the Threaded Class. They are used very very often in non-thread classes, just look at AB* files in LibSrc.
In your GitHub Repo you only upload the APP. Please post your generated CLW and INC files.
That will make it possible to see how the generated code works without downloading and building. It also will allow JKing to compare his generated to yours to see if there is a difference.
Hello, can anyone verify the code in line 28, is the correct way to instantiate/call a class? All the AI generated classes I have, seem to have a similar problem at this point. Rich indicated he has some āpeculiaritiesā with his system and Iām wondering if I might be having some issues with my C11.1 system. Note, I have many third-party templates installed and they all seem to generate code/classes/etc. as expected.
Thanks,
Jeff
Yes it is.
However the error would indicate that either MyClassName is unknown or that you donāt have the ,TYPE attribute in the definition.
Its only a C6.3 app file so it can be upgraded by later versions of clarion.
Thereās no construct or destruct in that non threaded github class which is why I mentioned it. Iāll have a look at it in the debugger because the help docs gave me the impression construct and destruct only needs to be explicitly defined if the class is threaded.
I had the clw and inc files in the same folder as the app, not in the libsrc folder. Dont know if that makes a difference, but it enabled me to change it in another instance of the IDE between app generation and compile without having to save the app and exit.
This worked in C6 so later versions of clarion might have more compiler rules built in.
The code looks ok.
How did you get the files from GitHub?
Check that the ABCclass INC and CLW files from GitHub have 13,10 line endings?
The Git default is 10 only and that does not compile correctly in Clarion.
Hi Carl,
I simply downloaded the raw files from GitHub. I looks as if they have 10 but not 13,10. See image of Hex Editor attached. You noted Git default is 10, so perhaps that is the issue here. Can I do a find and replace of all 10 and set to 13,10?
Thanks,
Jeff
You should be able to search for āconvert line endingsā yourself or ask AI
Some editors will do it, like Notepad++ or VS Code
Web says DOS command
More /P < input.txt > output.txt
Didnt know that, will see how I can alter it using Githb desktop.
Thanks Carl! I used NotePad++ to convert the LF to CRLF and was able to compile an run this app. Iāll try this with some of my AI generated inc/clw files and report back.
Jeff
Forget that. All Clarion Repos must have a file named ā. GitAttributesā with one line:
* -text
# Disable EOL Conversion, leave all text files as CRLF in Git repo
Thank @jslarve for that! It insures the CLWs in the Zip download have 13,10 not just in 10 line ending.
My point was you should upload the APP generated CLWs to your Repo
Everyone,
We have had considerable sucess with Claude AI. We are building a replacement for MSSQL Merge Replication for our POS and store management software. It has taken a lot of work, but we got it to teach itself Clarion, the ABC templates, correct DCTX, and TXA. What we ended up doing was giving it all the Clarion documentation (the PDF files) and it taught itself. It could learn the template language just as easily. I have just asked the AI to make itās new knowledge available for other users.
You will need to bring in the Clarion-AI-Development-Guide.md into your own CLAUDE.md. I will add the .md file to a new post.


