[Gambas-user] Auto property type filling
Benoît Minisini
g4mba5 at gmail.com
Wed May 4 12:45:02 CEST 2022
Le 04/05/2022 à 12:09, bb a écrit :
> On Wed, 2022-05-04 at 11:03 +0100, Bruce Steers wrote:
>> I want to add a way to auto insert property types as I enter them.
>>
>> Eg.
>> if i type...
>> Dim bMySwitch
>> or
>> Private/Public bMySwitch
>> Then when hitting space i want it to auto-detect I'm defining a
>> variable
>> and see the lowercase letter followed by an uppercase letter and use
>> the
>> lowercase to auto-add the *As Boolean* bit.
>>
>> My question is...
>>
>> Where is the best place to add code for it?
>> Would it be the in the texteditor gambas mode class or in
>> Completion/FCompletion classes somewhere?
>>
>> Any suggestions/advice appreciated Ben (or anyone else)
>>
>> Cheers
>> BruceS
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
> Why not use the code snippets?
>
> If I want to add, say a flag, then db[TAB] gives me
> Dim b? as Boolean
> with the cursor on the ? and I can then complete the variable name,
> press [TAB] and the cursor is at the end of the line (where I can type
> "=false" for instance.
>
> b
>
Clever idea! I forgot the code snippets, sorry code snippets.
--
Benoît Minisini
More information about the User
mailing list