Hi,
Can someone that has Clarion 12 confirm if Softvelocity fixed this Template code:
#CREATE('MyExport.TXD')
#EXPORT(%DictionaryFile)
#CLOSE('MyExport.TXD')
Or is it still broken.
Regards
Johhan de Klerk
Hi,
Can someone that has Clarion 12 confirm if Softvelocity fixed this Template code:
#CREATE('MyExport.TXD')
#EXPORT(%DictionaryFile)
#CLOSE('MyExport.TXD')
Or is it still broken.
Regards
Johhan de Klerk
I tested and found #EXPORT(%DictionaryFile) created a Zero byte file. Reported in Beta
I edited ABWDCTP.TPW to add the below lines, then I registered ABWizard.TPL.
I tested by opening the SCHOOL.APP example
On the Application menu picked Utility Template
Then tried each of the below Templates
All 3 write Zero bytes files.
#!=========================================================================
#UTILITY(TTTestExportDCT2TXD,'Export DCT to TXD')
#DECLARE(%OutPutFile)
#SET(%OutPutFile,%DictionaryFile & '_Test.TXD')
#CLOSE
#CREATE(%OutPutFile)
#EXPORT(%DictionaryFile)
#CLOSE(%OutPutFile)
#!=========================================================================
#UTILITY(TTTestExportDCT2TXD222,'Export DCT to TXD #222')
#CLOSE
#CREATE('MyDCT_Test.TXD')
#EXPORT(%DictionaryFile)
#CLOSE('MyDCT_Test.TXD')
#!=========================================================================
#UTILITY(TTTestExportDCT2DctX,'Export DCT to DctX')
#DECLARE(%OutPutFile)
#SET(%OutPutFile,%DictionaryFile & '_Test.DctX')
#CLOSE
#CREATE(%OutPutFile)
#EXPORT(%DictionaryFile)
#CLOSE(%OutPutFile)
#!
Also I reported on the same post:
==========================================================
I think related to this is if you have an APP open and try to Export the DCT (which is open ReadOnly) it fails with an Error.
---------------------------
---------------------------
Failed to export E:\TestDev\School9Ways\School9_14487\SchoolTps9\SCHOOL.DCT Error writing text file
---------------------------
OK
---------------------------
I would guess that its open Read Only is the problem. DCT should not need to be opened Read/Write to export. This and the #1 problem of #EXPORT(Dct) should Not touch the file date.
Hi Carl,
Thanks for confirming it is still a problem/bug in C12.
Yes it was reported many times and for many years on the Problem Tracker and sometimes a PTSS number was assigned but it was never fixed.
It seems SV has taken the Problem Tracker down so can't get the PTSS numbers.
It is still the same problem in C10.
Regards
Johan de Klerk
Reported as "Both are fixed for the next refreshed build"
#1. #EXPORT(%DictionaryFile) : the #CREATE'd file stayed at 0 bytes. The dictionary's text writers (the ones behind Export Dictionary to Text and ClarionCL /dx): #EXPORT now goes through them; when the current output file's name ends in .TXD you get the TXD script, with any other extension (.DctX) you get the dictionary XML, line for line what ClarionCL /dx writes for the same dictionary. Your template works as posted.
#2. The export reader opened the dictionary tables in read/write. An Open .app held its dictionary as read-only with the same deny-write share, so the reader's open was refused and the message blamed the output text file. The reader now opens the dictionary read-only (it never wrote anything). Export Dictionary to Text works with the application open, and so does #EXPORT from a utility running in that application. Neither touches the dictionary's file date.
@MarkGoldberg posted this on the TXA thread that is also useful for this TXD thread
Somewhat related, are templates that generate TXA (and now TXD) every time you generate your code.
see ClarionCommunity/CW/Templates at main · MarkGoldberg/ClarionCommunity · GitHub
Note the TxaExport.tpl version uses WrapRun.dll (and the source for that appears in a subfolder)
The reason for the WrapRun is that in C7+, the #EXPORT(%DictionaryFile) is broken, so we're relying on calling ClarionCL to export the DCT
Thanks for sharing this, Carl!
Just a reminder to everyone that Mark's project, along with many other useful Clarion tools and GitHub repositories, is also discoverable through Clarion Desktop:
https://clariondesktop.com/en/resources/projects/monolith-gen-txa-template
We're currently up to 489 Clarion resources from around the world, with the site available in six languages. That includes commercial products, free utilities, open-source projects, GitHub repositories, and more.
One thing I'd particularly encourage everyone to use is the ability to suggest edits or additional search keywords right from a resource's page. If you know something about a project that would make it easier for another developer to find, you can help improve its listing.
And if you know of a useful Clarion resource we're missing, we'd love to hear about it!
The goal is pretty simple: make Clarion Desktop the go-to place for finding just about anything related to Clarion, and keep it current with help from the community.
Charles