So when I add #Include('SomeFile.EXT')
to a template (tpw or tpl) it doesnt matter, when I load an app before it loads the appgen I get a message saying Error:Expected a Section Header
The only reference to section header is in the main language help doc Include('filename.ext','Section Header')
Look at the start of the files #INCLUDE(d) by CW.TPL or ABCHAIN.TPL and you’ll see that the first non-comment line has to be a section header like code or #PROCEDURE or #MODULE or #CONTROL etc
I think I’ve figured it out. I found this in the help docs: #Append('filename'),Section('GlobalEmbeds')
#Section('GlobalEmbeds')
#EndSection
So where I had been using #Include('filename.tpw'),Once
I changed that for #Append('filename.tpw'),Section('GlobalEmbeds')
and then in the filename.tpw file I have #Section(‘GlobalEmbeds’) #At(blah) #EndAt #EndSection
and I’m not getting any errors when the appgen loads.
You see when you look up #Include in the C11 help docs, there is zero mention of #Append or #Section/#EndSection, but the #Append appears to be the same as #Include('Filename.tpw'),Once from what I can tell, and then just wrap the template code in Filename.tpw with the #Section/#EndSection and so far it works in my limited tests.
#APPEND and #INCLUDE are used for completely different purposes. #INCLUDE adds template code that’s used by the AppGen #APPEND adds source code that’s added to that generated by the templates
Well to add to this, so thanks to #RunDll OutputDebugStringA I can now see that even though no errors are thrown, the code in the section shown above doesnt get called.
So in this instance, I can not detach these #At/#EndAt template code from the #Extensionsheet and put them in a separate .tpw.
So that might well still explain why there is no link with #Include and #Append in the help docs.
It is very information having the outputdebugstringa working though
AFAIK ONCE isn’t valid as a parameter of the #AT command and you seem to be using it all over?
ONCE is only valid as a parameter of the #INCLUDE command (templates) or INCLUDE (source)
Thats possible, this is why I’ve been trying to get the outputdebugstringa to work for months, to find out what works and what doesnt.
#Call doesnt work in some situations which I’ve only been to find out since getting this debugview api to work yesterday. Its surprising how much stuff on this computer doesnt work.
Its why I shut my company down years ago, too much hacking which I’ve been witnessing since I first got online in the dialup days in the 90’s and the police dont want nothing to do with it, they deny the evidence put before them.
Because the computer hacking is so bad in the UK, I take all docs, including the MS website api’s (MSDN) with a pinch of salt, because it changes and its easy to change docs, its harder to change the program code.
I was warned decades ago, if I dont want to be hacked dont put any computer online, I was also shown what to look for without any programs how to spot when Windows has been hacked and I see it all the time on this computer.