Author Topic: IDE improvements (v1.5)  (Read 10258 times)

0 Members and 1 Guest are viewing this topic.

FellippeHeitor

  • Guest
Re: IDE improvements (v1.5)
« Reply #45 on: January 16, 2021, 09:03:52 am »
Double click now works to add multiple characters, as described/demonstrated. Thanks for the suggestions.

Offline RhoSigma

  • QB64 Developer
  • Forum Resident
  • Posts: 565
    • View Profile
Re: IDE improvements (v1.5)
« Reply #46 on: January 16, 2021, 03:30:26 pm »
That's good done @FellippeHeitor,

I like that move to introduce the new "Tools" menu to clean out and reserve the "Help" menu for real help related entries. The ASCII chart also looks better now and the behavior is as expected. Maybe another tweak can be done to the new double-click feature...

Current behavior:
- a double-click always resets the default button to "Insert char" and then inserts the char into the edited code

Better behavior:
- if I TAB to change the default button to "Insert CHR$" and then double-click a char, should keep the default button "Insert CHR$" and insert CHR$(...)
- maybe better it should insert CHR$(...) + , for concatenation (cause it's easier to delete the final +, rather then afterwards insert it between all the inserted CHR$(...)
- even better better, add a checkbox to allow the user to choose, if he wants the + or not




For your other working place regarding disk usage, I've now finished the special edition of the SB-Storage system and updated my Libraries Collection download on the page linked in my signature.
This edition allows the use of handles to dynamically create new buffers, so it should be more suitable for your needs. The easiest workflow could be like the example below, so it would be more or less just a replacement of the file based commands with the buffer related commands, you said you want it simple :)

Code: QB64: [Select]
  1. '$INCLUDE: 'QB64Library\SB-Storage\stringbuffer.bi'
  2.  
  3. '--- somewhere during program init
  4. '-----
  5. REDIM SHARED MyBuffers$(0)
  6. REDIM SHARED MyFileNames$(0) 'DIM whatever number you need
  7.  
  8. '--- buffer equivalent to opening a file
  9. '-----
  10. bufHandle% = 0 'this is like a file number
  11. InitBuf MyBuffers$(), bufHandle%: MyFileNames$(bufHandle%) = "Test.txt"
  12.  
  13. '--- writing to buffer, synonym for PRINT #..., hence line breaks will
  14. '--- be added automatically, there are also functions to write raw data,
  15. '--- which would be a PUT #... synonym
  16. '-----
  17. WriteBufLine MyBuffers$(), bufHandle%, "Some text."
  18. WriteBufLine MyBuffers$(), bufHandle%, "Some concatenated text. This is buffer #" + LTRIM$(STR$(bufHandle%))
  19. '...
  20.  
  21. '--- finally save all buffers
  22. '-----
  23. FOR i% = firstBuf% TO lastBuf%
  24.     BufToFile MyBuffers$(), i%, MyFileNames$(i%)
  25. NEXT i%
  26.  
  27. '--- there's no synonym to close a buffer, simply re-init any buffer to
  28. '--- discard the old data and clear all markers (if any), after InitBuf()
  29. '--- the buffer is always like a fresh file opened for OUTPUT
  30.  
  31. '$INCLUDE: 'QB64Library\SB-Storage\stringbufferWH.bm'
  32.  
  33.  
My Projects:   https://qb64forum.alephc.xyz/index.php?topic=809
GuiTools - A graphic UI framework (can do multiple UI forms/windows in one program)
Libraries - ImageProcess, StringBuffers (virt. files), MD5/SHA2-Hash, LZW etc.
Bonus - Blankers, QB64/Notepad++ setup pack

FellippeHeitor

  • Guest
Re: IDE improvements (v1.5)
« Reply #47 on: January 16, 2021, 03:35:44 pm »
Maybe another tweak can be done to the new double-click feature...

Current behavior:
- a double-click always resets the default button to "Insert char" and then inserts the char into the edited code

Better behavior:
- if I TAB to change the default button to "Insert CHR$" and then double-click a char, should keep the default button "Insert CHR$" and insert CHR$(...)
- maybe better it should insert CHR$(...) + , for concatenation (cause it's easier to delete the final +, rather then afterwards insert it between all the inserted CHR$(...)
- even better better, add a checkbox to allow the user to choose, if he wants the + or not

See, the 'Insert character' button is the default button - meaning it will be triggered when no other button has focus upon hitting ENTER. When the chart has focus, the default button will be triggered, regardless of which button you temporarily had focus on before with TAB - that merely changed focus, not the default dialog button after all (I'm following Windows' logic here, I believe). That said, I believe the double-click shortcut should have a single behavior, really.

I will be checking your buffer code, but again, no guarantees. Thank you for working on it!
« Last Edit: January 16, 2021, 03:36:55 pm by FellippeHeitor »

FellippeHeitor

  • Guest
Re: IDE improvements (v1.5)
« Reply #48 on: January 16, 2021, 03:45:14 pm »
To further extend on my reasoning to keep it as it is, take this dialog:

  [ You are not allowed to view this attachment ]  

OK is the default button, as indicated by the blue outline. That's equivalent to our COLOR 15 "< >" button indicators.

If you have focus in the text area, ENTER triggers OK.

If you tab to any button and hit ENTER, you'll be triggering whichever button you had focus on - OK, Cancel or Browse.

As soon as you click back into the text field though, no matter which button had focus before: ENTER will trigger the OK button, as it's the default.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: IDE improvements (v1.5)
« Reply #49 on: January 16, 2021, 03:53:12 pm »
To expand on what I mentioned before:  Add one more field to the ASCII popup, as a “preview-input” area, rather than a double-click auto-insert into the code. 

Think of it like in your image above where it reads “calc” — an input box for the keypress(s).  Then it’s easy to toggle between inserting the actual character(s), or the CHR$/STRING$ equivalent into the code with a single click.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

FellippeHeitor

  • Guest
Re: IDE improvements (v1.5)
« Reply #50 on: January 16, 2021, 04:39:08 pm »
Thanks for your input, Steve.

FellippeHeitor

  • Guest
Re: IDE improvements (v1.5)
« Reply #51 on: January 18, 2021, 08:35:36 pm »
New development build available today, built from git c46b441. Here's the list of the latest commits: https://github.com/QB64Team/qb64/commits/development