|
Post by Enzo on Apr 29, 2021 0:12:40 GMT
Basically, if you use JB commands as array infomation and when read it will null the complier, as it seeks these and mistakes "Words" as actual machine code. Thinking the JB code has errors when it does not. I found a long time ago on a similar project, actually another listbox IDE cundo used back in the day. Not sure how/why typos were there but you understand the gist.
|
|
|
Post by xxgeek on Apr 29, 2021 3:36:35 GMT
Hmmm, I have a theory. The "Dictionary" program was written a while back, and has most likely made it's way into many a program by now. And has most likely corrupted many files as users have tried to copy the code using the dictionary code in their apps.
Here is what I have found. The "corruption" begins in the function "collectGarbage" at the line:
if instr(keyList$, "@key@" + key$ + "@value@") = 0 then
When viewing the line in the dictionary.dat file created the line becomes:
if instr(keyList$, "
Then the corruption appears in the LIST as well as the dictionary.dat file.
It has something to do with instr( and the "
The very next character in that line is the ~ character I'm thinking that the " shouldn't be in a instr( command when being read by it's own running code. Why this happens, I have no idea.
I have copied many, many programs with commands using this Dictionary program with great success. So it's either a bug in JB, or it is improper coding in that particular line, or the entire collectGarbage function.
One thing I have not come across as yet is a reason to put an A or special character A in front of commands in my lists, or my texteditors.
Thanks for shedding more light enzo. I don't believe the A thing, and this corruption problem are the same thing though.
Have you got any example code to show your problem (the A in front of commands) in action?
|
|
|
Post by Enzo on Apr 29, 2021 5:25:14 GMT
Arrays, not string$, also this was JBs previous verison between v1.0 - v2.0
|
|
|
Post by Rod on Apr 29, 2021 8:51:05 GMT
In the garbage collection rouine the program is using the key delimiters to hunt for obsolete code. It finds the coded "keys" which are not real keys but it treats them as keys anyway and so deletes content AND upsets the key chain.
So the problem will always be there if delimiters are not kept unique. By definition the delimiters cannot be made unique if free text or copies of keys are involved.
You will have to use another storage method, one that avoids reliance on delimiters. I am not sure I understand your use of the dictionary code just yet. If you had a list of reserved words with support text or pseudo code in arrays would that not suffice?
|
|
|
Post by Rod on Apr 29, 2021 11:07:36 GMT
|
|
|
Post by xxgeek on May 1, 2021 18:06:53 GMT
Thanks Rod, I may be able to use ONE dictionary and get away with using a delimiter, but more than ONE and there are problems. I need 4 of them to do what I was planning. I'd have to redo every function to allow for each different delimiter. So, I guess I'll just have to buckle down and find a different method. I checked out the code you posted and don't think it's what I need(maybe some pieces), but I did find another of Uncle Bens apps called Tiny Tools that I may be able to use some of the techniques. If not I'll write some new code to save examples and guides to files of their own. I was hoping to avoid creating a bunch of files on a users HD but if that's what will work best then that's what will be the way forward. Been out of practice so long my head spins thinking about all the things I'm trying to get into one app(especially without using any dependent files re: using zipped up extra files), and the bas file is getting so long my scroll wheels are wearing out lol I'd like to keep it to one bas file, but I know eventually I will want to add some freeware files to do things like view html help files instead of opening a big browser, and maybe 7zip to automate making a standalone self extracting exe file for each project. Once I engage dependent files, I have a ton of ideas using freeware. Sure has been an adventure though, and I'm glad I got into it when I did. Had it been summer time, and no pandemic, I doubt I would have put in the effort. Thanks for all the help and advice, plus the research you must have done to get this info, much appreciated. P.S. I'm glad Uncle Ben didn't stick solely to making converted rice
|
|