[Gambas-user] Auto property type filling

Bruce Steers bsteers4 at gmail.com
Thu May 5 10:38:24 CEST 2022


On Wed, 4 May 2022 at 11:10, bb <adamnt42 at gmail.com> wrote:

> 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.
>

Cheers Bruce
i already added some code but if it turns out buggy i may well go for the
snippet method :)

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220505/266b90f9/attachment.htm>


More information about the User mailing list