|
Post by xxgeek on Aug 21, 2023 18:37:55 GMT -5
xxgeek, please explain the reason of creating TKN, I don't get it as well. The codeTank program is basically for storing/retrieving source code. What is supposed goal for creating the TKN? If I don't create the TKN I get problems trying to update it hehe couldn't resist For MyProjects, [RUN Button] runs the renamed exe. TKN is needed with it. Backup TKN copied to TKN dir is/was used for Reverting back. Dated/Time_stamped .bas, and tkn match for Reverting For MyPrograms I thought I could RUN a .tkn file from code, and I can from DefaultDir$, but haven't got the right syntax to go 2 folders deep and run a tkn yet. Presently using the .bas and LB commandline to RUN -R -A style to RUN a MyProgram. Will change later to Run "blah\blah\blah.tkn". I think it is because my DefaultDir$ has a space in the name, but if I rap it in quotes I get "out of memory error". Still trying new ideas as I dream them up. Yes this is a CodeTank for LB source, but it is also CodeTank Plus and was part of a larger program, with some other features added as well. Those features can be added, but were not initially because I wanted to allow those interested to have input as to how to build this into something appreciated and useable. The JB version I've been using has comboboxes for Virtual Key Codes, ASCII Codes, Dos Error Codes and Reserved Words There are buttons to RUN BAS2EXE and edited versions of, FastCode by Cundo, JB Help Search by cundo, FreeFormUltraLite by Rod, the JB Help list and JB Tutorial But that's me. I like to have everything I can get on one page, where I can quickly get lots of stuff done.
|
|
|
Post by xxgeek on Aug 21, 2023 18:45:03 GMT -5
Hey, if what you guys want is to just have text/code and no tkn's and exe's that ok too. btw - I just got tkn's to run from 3 folders deep Won't need to have the IDE opening when RUN'ing more of the files now.
|
|
gaslouk
Full Member
Hi from beautiful Greece.
Posts: 130
|
Post by gaslouk on Aug 21, 2023 23:55:47 GMT -5
xxgeek, please explain the reason of creating TKN, I don't get it as well. The codeTank program is basically for storing/retreieving source code. What is supposed goal for creating the TKN? Ηι
I think the creation of the .TKN file is done so that they can't steal the code or part of it. Like the .EXE it is created by the owner of the file for the same reason.
I don't personally believe in intellectual property and I don't want to imagine what our world would be like if a relative of great people like Homer or Democritus or Thales Milisius or the brightest example of our world Diogenes Sinopeus came to ask for money to learn from their writings. I think that since man started to get bored of working, he discovered such solutions as money, copyrights and other kinds of tricks to not work, but to have others work for him. A popular saying goes "Laziness makes art"
Gaslouk.
The continuation in another post when I get the chance again.
Good morning from greece.
|
|
|
Post by xxgeek on Aug 22, 2023 12:48:13 GMT -5
Persistance pays off again. Glad I didn't give up on Walts Display code. I have managed to use the first version of Walts Functions for the display, along with tsh73's edits for resizing, and a couple of edits of my own to get it to work here. Let me know if this new display works for you guys. I think this version fixes most, if not all issues reported so far. I made so many changes I may forget some of the minor edits done as I cruised the code. Added A 2nd Window mirroring the texeditor, opens using the new button [Mirror Texteditor], and has it's own font resizers. BTW - shift + "+" and shift + "-" change font size as well. One file for Pro, and non Pro. No more separate file for each. HotKeys - were there previously, but forgot to mention. Use shift + Char Button n = [New (Copy\Paste)] f = [New From File] u = [Update TKN] e = [Edit in LB IDE] r = [ RUN ] s = [Merge Shared File] v = [Revert to Backup] d = [Delete] + = Increase Font Size - = Decrease Font Size MyProjects and MyPrograms are read from the 'Dictionary' file and displayed in the texteditor, but they RUN,and Update from the created Re-named EXE, and created TKN respectively. They must be edited in the texteditor, then [Update TKN] to be upto date in their respective 'savedProject' folders. Editing the saved files outside of codeTank will cause major issues with codeTank, don't do it. Any LB original files are protected from the user, and if/when edited, they are actually copies of the originals. There will be notice given in the outputed untitled.bas file of this. I have allowed RUNing of 'MyBackup', LB Example files, and the LB bak files. Some of these files will leave the IDE window open on close, becasue they don't have a Trapclose statement. There will be prior notice of these files when selected to RUN. There are also other files in these locations that may leave the IDE open on close, but no way for the code to know, so beware of open IDE windows when RUNing files from these locations. Some files you try to RUN may open and close so fast you see just a flash. That's NOT codeTank, it's the code not ending properly (LB Examples have files like this) Just Open them in the IDE and edit them to work for you. Some files you try to RUN may crash because they don't pass the compiler check on startup. They shouldn't crash codeTank though, so close any open IDE windows and continue on with codeTank. walt - Getting back to you about the Automation of the TKN. When using the commandline to RUN .bas files and create a TKN file always opens a file dialog for the user to 'save as" the file where ever they wish. codeTank writes a VB script to send the [enter] message to that window to automatically 'save as' the name codeTank gives it, and puts the TKN where codeTank wants it, then the script looks for the "Information" window that tells the user where the file was 'saved', then sends an [enter] to that window to finish the automation of the TKN creation. If there is an easy simple way of doing this another way, more solid, and dependable, I would like to test it and possibly adopt it. It works very well for me here, but I use pauses and can't predict or test how it will work on other slower, and faster PC's than my own. In order to keep from overwhelming me with suggestions etc, let's keep the replies to issues for now. I can add suggested features etc later when the 'problems' have been cleared up. The new code (should work for LB and Pro) Problems? Let me know. NOTE - You MAY need to delete the old codetank.ini file in DefaultDir$ before RUNning.
|
|
|
Post by tsh73 on Aug 22, 2023 15:26:24 GMT -5
Re: new display on my machine lower row of buttons is half-hidden (below window bottom) That might be my fonts setup Resize do work
Mirror texteditor opens, it allows to edit, but changes do not save. Should it save? What supposed use for it?
Re: hotkeys
Pretty sure that is ALT+letter, not SHIFT (except for (+) which is Shift-=, so Alt-Shift-= )
|
|
|
Post by tsh73 on Aug 22, 2023 15:57:39 GMT -5
in [initiate], if "\codetank.ini" is found then program does goto [check] This way, uAppPath$ is not set.
I was able to fix that by copying setting of uAppPath$ in this section
if fileExists(DefaultDir$, "codetank.ini") then open DefaultDir$;"\codetank.ini" for input as #1 line input #1, LBpath$ : close #1 if fileExists(LBpath$, "liberty.exe") then LBexe$ = "liberty.exe" '!! 3 lines added - copied here so uAppPath$ will be set after reading INI if fileExists(upath$;"\Application Data\Liberty Basic v4.5.1", "freeform450.bas") then uAppPath$ = upath$;"\Application Data\Liberty Basic v4.5.1" end if end if
|
|
|
Post by tsh73 on Aug 22, 2023 16:05:43 GMT -5
I just tried to run "fonttest" and it says me:
Really I expect two choices, run or not run. What's the difference between Yes and OK? For me it looks like it works the same. BTW this very program has trapclose statement, but in capslock
print #main, "TRAPCLOSE [main.END]" So you might want to add some lower$() in check.
|
|
|
Post by tsh73 on Aug 22, 2023 16:18:20 GMT -5
Speaking of TRAPCLOSE It looks like main program window has it commented out
' #codeTank "trapclose [quit.codeTank]" Does that mean no save/cleanup code executed on close?
(that probably need "codeTankOpen" variable to be made global, and make it consistent (codeTankOpen / CodeTankOpen))
|
|
|
Post by xxgeek on Aug 22, 2023 17:40:53 GMT -5
Thanks Anatoly, I missed those.
All fixed, but I'll wait a day or so to post an update, might catch a few more things in the mean time.
You were correct, it wasn't saving on exit any longer, but it will in the update.
|
|
|
Post by Walt Decker on Aug 23, 2023 9:38:00 GMT -5
I am amazed that it works. According to the docs, declared label branches in a sub/function are local to that sub/function yet in function createbankwindow you have declared most of the control branches as labels. Must be another LB idiosyncracy.
|
|
|
Post by xxgeek on Aug 23, 2023 18:13:06 GMT -5
Understood. Presently, NO, it won't save on exit. Wasn't programed to, but good idea. Been trying to get it to save, code is getting a bit complicated, some tiny little changes require a lot of thinking, and typing, not there yt with the close on save. The idea behind having the Mirror Editor was because those who have a max screen of 800x600 won't be able to see the full texteditor, and will have trouble editing it. The Mirror will allow a full screen 800x600 window for them to edit the text. Hey, I wish everyone had at least a 1000x600, it would make coding it childs play. Strang, I copy the text from Mirror to Original editor, but it won't do a save as it normally would using 'call saveValue'. Must be a variable needs reset or something. Working on it. If I don't get it soon, I'll just post without the Mirror texteditor until the day I have it working. walt, Interesting. I've since moved the globals out of the Function anyway, thought they might be causing problems and changed many to text, without a variable. Those variables in the creation of the window re: radiobutton text etc, were unnecessary old code from the days of newbieness with JB.
|
|
|
Post by Walt Decker on Aug 24, 2023 11:02:24 GMT -5
I think the IDE is somewhat forgiving. I have found that I can do some things in the IDE that cause system crashes when attempting to create an exe so you might be wise to move the code in function createbankwindow() out of the function and delete the function.
I did not expect you to copy/paste the function. It was a means of showing one way to adjust the form to fit a smaller resolution monitor. Another way to accomplish the same thing is to subtract the lower resolution monitor dimensions from the window dimensions and then subtract the difference from the width/height of the form, i. e.
' WinWide = 1000 WinHigh = 700
UserMonitorResx = 800 UserMonitorResy = 600
IF UserMonitorResx < WinWide THEN Diff = WinWide - UserMonitorResx WinWide = WinWide - Diff END IF
IF UserMonitorResy < WinHigh THEN Diff = WinHigh - UserMonitorResy WinHigh = WinHigh - Diff END IF
'
To be thorough you have to reposition and set the sizes of controls based on the change in client area size and set the text size based on the aspect ratio between your development monitor and the user monitor.
|
|
|
Post by xxgeek on Aug 24, 2023 15:38:29 GMT -5
Thanks Walt, I'll get around to it, maybe next version.
Just posted an update to version v1.4.2 Lots of new code, edits etc.
Texteditor mirror now works to save on exit, for now. I'll add some features later, like save, copy, paste etc or any requests.
I also added a button to the mirror so the user can use it as a scratch pad. Whatever is in the texteditor at the time this button is pressed updates the categorie/dictionary file of the selected key when the editor was opened.
The mirror editor becomes a scratch pad that gets deleted everytime it, the scratchpad, opens or closes. It does copy to a file (one instance) and overwrites it on close, or when it saves on close, in case you NEED that text.
BEWARE of having the mirror open, and going and editing the other texteditor for now. No code to keep everything in order if that happens, might work, try it if you dare. Categorie won't change unless mirror is closed and another selection of a RadioButton is made.
It all sounds hard to understand at first glance, but if you play with it for a while, it will grow on you, and become very easy to use. Once it's passed everyone's scrutiny, and errors quit happening, I'll add some more features. Keep in mind that some of the files it will be asked to open are in fact TROUBLE if they won't open in the IDE successfully. They will leave an IDE window open, and MAY post errors of there own. It's not CodeTanks fault and CodeTank should not be affected.
I set my display to 800x600 in Windows, and this looks ok here. Any issues, or anything to discuss, let me know. There is ONE setting of 800 I can change to 1000 to have my screen as I like it.
Thanks for all the feedback guys. Obviously I can only do so much at a time, but I do read, and consider all replies. Some things reported or requested may be noticed in later versions as I figure out how to implement them.
EDIT - Once a selected key has been edited, it saves automatically in a couple different ways. On exit, or when another RadioButton/Button/Title etc is selected. Once it saves, it goes to it's own category/dictionary file. To RUN this updated code you must first Re-Make the TKN. Applies to MyProjects and MyPrograms only.
|
|
|
Post by xxgeek on Aug 25, 2023 12:09:31 GMT -5
New Version posted v1.4.3
-removed codetank window from the function -removed the function as well -changed selecting .bas files from .bas only to any file - be careful to select appropriate source files.
-[Scratchpad] button now clears the texteditor when pressed as well as saves the text to appropriate dictionary file. Once pressed, you are in scratchpad 'mode' until it gets closed., unless it is closed. Still thinking on a better strategy for this.
-display uses the other functions along with tsh73's resizing code.
Working well here. Let me know of any issues I may of introduced.
Are there any suggestions mentioned so far, that have not been incorporated into the code that you feel should be, or I may have forgotten?
|
|
|
Post by tsh73 on Aug 26, 2023 5:46:33 GMT -5
Reading the text 1.4.4 Similar but different lines [runKey], line 307
if instr(code$,"trapclose",1) = 0 then line 326
if instr(lower$(code$),lower$("trapclose")) = 0 then line 345
if instr(lower$(code$),lower$("trapclose")) = 0 then line 364
if instr(lower$(code$),lower$("trapclose")) = 0 or instr(lower$(code$),lower$("'nomainwin")) = 0 then Probably they should be the same?
Also, check
instr(lower$(code$),lower$("'nomainwin")) = 0 looks weird for me. It actually checks for absence(!) of commented string(!!) But from this, it does not follow that "nomainwin" dirrective is present in a file.
Issue reported before, post of Aug 22, 2023 at 11:57pm : * If INI file exists, uAppPath$ is not set
|
|