Autocomplete

Working on new editor enhancements?
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Autocomplete

Post by Kaeru Gaman »

It would be nice, if the Autocomplete-dropdown would close when the last letter is typed.

at the moment its sometimes not that convenient to edit lines that include names listed in the autocomplete.

additionally:
autocomplete should only set upper/lower case when the inserted command is complete.

example:
Try to name a Constant "#Sub_Division". when you type "sub",
the autocomplete will complete it to "#SUB" and ignore, that you will type further.
so you'll have to complete the new name, and then re-type the beginning.

I hope, that is not too complicated to solve...

I know, you, Freak, have a lot of work to do and a lot of serious tasks to solve...
but this little correction will optimize the conveniance of using the autocomplete.. ;)
oh... and have a nice day.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

any remark, if you even think about it?
oh... and have a nice day.
freak
PureBasic Team
PureBasic Team
Posts: 5941
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

I have put it on the 4.1 todo list for the IDE updates.
I cannot give any guarantees though.
quidquid Latine dictum sit altum videtur
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

ok thnx for reply :)
oh... and have a nice day.
freak
PureBasic Team
PureBasic Team
Posts: 5941
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

Done for 4.1
quidquid Latine dictum sit altum videtur
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

thnx a lot :D
oh... and have a nice day.
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

I have also a suggestion:

Imagine you have got a line containing strings like this:

Code: Select all

Debug LCase("My name is "+|name$+" and yours?")
The | should be the cursor.

Sometimes, you have got to insert a string after you've completed the line, so imageine, we want to include Chr(9)+"beep" which does not make sense, but it shows my problem (currently, I have no better exmaple, sry).

When you type " for the first time, auto-complete destroys the upper-/lower-case-writing of the following words:

Code: Select all

Debug LCase("My name is "+Chr(9)+"|name$+" And yours?")
Now, it cnsiders name$+ as string and And yours?") as additional code. As you can see, the word "and" is being interpreted as operator 'And'.

Can you somehow fix this problem? Maybe the IDE can wait until the cursor leaves the line (line break or user clisk "compile")...
PB 4.30

Code: Select all

onErrorGoto(?Fred)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

@AND51: I don't see how the IDE can prevent this, because it can't read your
mind and know if "And" is going part of a string, or whether it's a keyword.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Oh... You're right. :(
Any idea, how I can solve this problem? My workaround: Bringing the rest of the line into a new line to prevent upper-/lower-case destroying. But this is not very comfortable.
PB 4.30

Code: Select all

onErrorGoto(?Fred)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

Just put a comment mark in front of the string to retain its case, then just
remove it after editing; it saves you moving the string to another line.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Thanks for this idea! :)
PB 4.30

Code: Select all

onErrorGoto(?Fred)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

I've been doing it for years. ;)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
aaron
Enthusiast
Enthusiast
Posts: 267
Joined: Mon Apr 19, 2004 3:04 am
Location: Canada
Contact:

Post by aaron »

How about the IDE not changing the capitalization of words until the cursor moves from that line?
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

That's hat I suggested before!

There are 2 situations in which the line must be capitalized:
1.) Cursor moves from that line
2.) EditorGadget looses focus (e. g. when clicking on "Compile/Run")
PB 4.30

Code: Select all

onErrorGoto(?Fred)
freak
PureBasic Team
PureBasic Team
Posts: 5941
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

The capitalisation is helpful to indicate that something was typed correctly.
If it is only done when moving from the line, this becomes useless
quidquid Latine dictum sit altum videtur
Post Reply