case correction inside quotes
-
- User
- Posts: 31
- Joined: Sun Feb 02, 2020 9:14 am
- Contact:
case correction inside quotes
This has been a pressing concern for a while now, and it's getting really annoying, so I figured I may as well post about it here.
Let's say I have a string for a button that is called "back to main screen"
Well, pure basic randomly capitalized the To, but sometimes it did and sometimes not, causing identification of the used thing via if expressions to become extremely tedious
For a more accurate representation of what has been happening:
listviewgadget
in listviewgadget, 3 items, view intentory, item shop and back to main screen.
If user selected back to main screen, go back to main screen
But one of them were capitalized and the other not.
Could this please be fixed?
// Not a bug. Moved "The PureBasic Editor" (Kiffi)
Let's say I have a string for a button that is called "back to main screen"
Well, pure basic randomly capitalized the To, but sometimes it did and sometimes not, causing identification of the used thing via if expressions to become extremely tedious
For a more accurate representation of what has been happening:
listviewgadget
in listviewgadget, 3 items, view intentory, item shop and back to main screen.
If user selected back to main screen, go back to main screen
But one of them were capitalized and the other not.
Could this please be fixed?
// Not a bug. Moved "The PureBasic Editor" (Kiffi)
Re: [urgent] case correction inside quotes
Post a working code so we can test it.
Re: [urgent] case correction inside quotes
I have never found that the IDE does this "randomly". It happens when you delete a quote mark and move away from that line. Which *is* kinda annoying, but I accept it.
Alternatively, you could turn off case correction in the options, which is not ideal imo, but PB is case-insensitive after all.
Alternatively, you could turn off case correction in the options, which is not ideal imo, but PB is case-insensitive after all.
Proud supporter of PB! * Musician * C64/6502 Freak
Re: case correction inside quotes
Personnally, all options are shut down for me : auto-indent, auto-completion, case correction, debugger etc...
It just stays the highlighting system, and the [Control]+ options : this modifies the source exactly when I want.
There is the whole syntax command too, in the bar system.
Finally... I keep 2 or 3 options, but all that modifies automatically the code has been removed. I think these options are good when we want to discover a new version, new features, or when we are beginners. But, once we know the basis, it could be more useless than useful.
I see what rory-games is talking about : a "multi-concatenated" string source code line.I suggest, that,
this system, this automatic one, should execute this source code modifying, only if assertions.
I suggest, that,
these assertions, should be as booleannally true, ifI have a question :
How could I know, howmany bytes must be allocated to load file datas of the IDE source code ?
Thank you
It just stays the highlighting system, and the [Control]+ options : this modifies the source exactly when I want.
There is the whole syntax command too, in the bar system.
Finally... I keep 2 or 3 options, but all that modifies automatically the code has been removed. I think these options are good when we want to discover a new version, new features, or when we are beginners. But, once we know the basis, it could be more useless than useful.
I see what rory-games is talking about : a "multi-concatenated" string source code line.
Code: Select all
A$ = "Name : " + Name$ + Chr(9) + "Hobby : " + Hobby$ + Chr(9) + "Etc..."
this system, this automatic one, should execute this source code modifying, only if assertions.
I suggest, that,
these assertions, should be as booleannally true, if
Code: Select all
CountString(SourceCodeLine$, Chr(34) ) <= 2
How could I know, howmany bytes must be allocated to load file datas of the IDE source code ?
Thank you
Re: case correction inside quotes
I don't know why you are overcomplicating it. It is simply a quote pair "problem", which exists in other editors and is not specific to PureBasic. A similar type of thing happens on Commodore 64 even
To overcome the "problem" one would need to introduce stupid logic to the case correction, and IMO is simply not worth it.
To overcome the "problem" one would need to introduce stupid logic to the case correction, and IMO is simply not worth it.
Proud supporter of PB! * Musician * C64/6502 Freak
-
- Always Here
- Posts: 6425
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: case correction inside quotes
Absolutely true. UltraEdit, for all it's whistles and bells, is the same. The trick is to place opening and closing quotes first, then insert your text.exists in other editors
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: case correction inside quotes
Example? I've never seen this on C64 (case-changing when editing a line).oreopa wrote:A similar type of thing happens on Commodore 64 even
Re: case correction inside quotes
Sorry. I wasn't clear. I was just referring to the fact the C64 also has *a* double quotes "problem". An entirely different one, albeit.BarryG wrote:Example? I've never seen this on C64 (case-changing when editing a line).oreopa wrote:A similar type of thing happens on Commodore 64 even
Proud supporter of PB! * Musician * C64/6502 Freak
Re: case correction inside quotes
The PureBasic IDE has several situations where problematic case correction occurs. I encounter them often. The ones I list deal with quotes and comments.
Here are the ones I encounter:
Here are the ones I encounter:
- When the initial ';' is deleted accidentally from the start of a comment. This sometimes happens if pressing [Ctrl+Shift+B] while being anywhere within the line.
Only solution to this is to simply be careful.
Code: Select all
;select csv data file or files to add to database. ;Select csv Data file Or files To add To database. ;deleted ';' from previous line and then undid the action
- When pasting multiple lines of text that would become a comment but this has since been fixed by adding options to paste multi-lined text as comments where a ';' is added automatically at the beginning of each line.
Code: Select all
;This is the original quote and for this example it is already broken up into separate lines. A database is an organized collection of data, generally stored and accessed electronically from a computer system. Where databases are more complex they are often developed using formal design and modeling techniques. ;The three line quote is pasted by pasting [Ctrl+Shift+V] ;A database is an organized collection of data, generally stored and accessed ;electronically from a computer system. Where databases are more complex they ;are often developed using formal design and modeling techniques. ;The three line quote is pasted first and then ';' is added at the front of each line manually. ;A database is an organized collection of Data, generally stored And accessed ;electronically from a computer system. Where databases are more complex they ;are often developed using formal design And modeling techniques. ;There is one more possible problem situation where a commented quote is longer than desired ;and is broken up by pressing return and then adding the ';' to the new line. This is solved by typing the ';' first and then pressing return in front of that new ';' so that the new line is treated as a comment right from the start. The portion of the line that will become a new comment line can also be highlighted, cut [Ctrl+X], and pasted as a comment on the next line by using [Ctrl+Shift+V].
- When breaking up an already quoted string into smaller parts to make use of concatenation.
Code: Select all
shape$ = "Box" ;edit the following line by modifying it to adding the concatenation of shape$ and remove the word 'point'. a$ = "Draw a line or point while holding the right button and stop only if needed." a$ = "Draw a line or " + shape$ + "While holding the right button And stop only If needed."
The only solutions to this are to retype the whole line after the first character that differs or perhaps to paste in two quotes first '""' into the middle of the string. Both of these choices leave something to be desired. A good solution might be if the case correction can be turned off until the cursor moves to a different line.
Re: case correction inside quotes
I thought of this myself, then I realized that it's more often than not that I actually press cursor up/down by accident whilst editing a string - triggering this situation in the first place So it really wouldn't fix anything for me.Demivec wrote:A good solution might be if the case correction can be turned off until the cursor moves to a different line.
I think I will use your earlier mentioned solution...
Demivec wrote:Only solution to this is to simply be careful
Proud supporter of PB! * Musician * C64/6502 Freak
Re: case correction inside quotes
I've given this some thought and made the realization that we don't need to implement additional logic In the IDE's case correction. Since the situations where problems occur are identifiable from a user's perspective perhaps some keypresses could be implemented to turn the case correction on/off or simply to toggle it. An indicator can also be added that shows whether case correction is active or not.