#Template code calling template code that is not accessible from the Redirection file - Anyone seen this before?

Tags: #<Tag:0x00007f2259c4d330>

So trying to sort out a bug in a template and I’m using #Rundll with debugview and somehow a tpw template file is being called, that is in a subfolder not listed in the redirection file and the code is broken anyway, like its missing a closed bracket after a group and others that should make it throw an error when I try to load an app file.

Has anyone seen this before?

I’m beginning to think this isnt a proper copy of windows but a linux distro made to look like windows with some sort of subsystem like Wine or something to make windows app run on it, there are a few oddities with the way windows is working.

Sounds to me more like you simply have a bug in your code. :slight_smile: - Or at least that’s always been the case for my coding. As much as I’d like to blame almost everything else, it always ends up being a bug in my code.

There are a couple ways to see what TPW is in play;
a) In the template registry, locate something you think is in the TPW - a Procedure or Code or whatever, then click “edit”. That’ll open the file that is registered.

b) if you know the name of the file, go into the IDE, open an App, Then Ctrl-O and type the name of the TPW. Don’t navigate to it. It’ll find the file using the RED, and you can then inspect the tab to see where the location of the file is.

It’s not uncommon (for me) to be editing a file in one place, but the system is using a file from another place, especially if you have multiple versions active. [1]

[1] If you open an app in say version A, and then open a TPW, then it’s open. Then you close everything, change to version B, and open that app again. It remembers the TPW, since you were editing that last time, but opens the TPW for version A (obviously - right?) and you happily edit that, but the version in play, and hence template in play, is for version B.

Cheers
Bruce

That is a situation that could cause problems but isnt my situation. So I found out a template tpw #Group was being called, the #Group was not terminated with a closed bracket, and was located in a subfolder that was where old template code went, it could be working code or code that doesnt work to highlight what doesnt work.

The line of code would have read
#Group(%grpSomething #Call(%DbgVw,‘Message’)

The output in debugview was correct, the appgen wasnt complaining at that time about a missing closed bracket in the group. I wasnt calling this #group anyway.

I edit my tpw files in a text editor, sometimes notepad, sometimes the clarion editor, I have the tpw’s associated with notepad so I can doubel click a tpw in file explorer and it loads notepad.

I have one instance of clarion running, and the template is NOT set to read only, so that changes I make can be reloaded when I close the app and reload the test app.