[Gambas-user] customising my gambas TextEditorMode
Tony Morehen
tmorehen at ajm-software.com
Thu Dec 3 01:03:01 CET 2020
Nothing should happen. Did you try compiling your code? Running your
code ie writing to and reading from your property? It should work.
According to the wiki:
*Property* Name *As* *String**Use* $sName
is an exact equivalent of:
*Property* Name *As* *String* *Private* $sName *As* *String* *Private*
*Sub* Name_Read*()* *As* *String* *Return* $sName *End* *Private*
*Sub* Name_Write*(*Value *As* *String**)* $sName *=* Value *End*
Gambas does not create the equivalent code, as it would with a code
snippet. The property declaration with Use replaces all that code.
On 2020-12-02 6:30 p.m., Bruce Steers wrote:
> Can anyone confirm or deny doing what Ben says works?
>
> I tried...
> Private Type As Integer Use $Type
>
> And nothing happened.
> Bruce.
>
>
> On Tue, 1 Dec 2020, 17:15 Benoît Minisini, <g4mba5 at gmail.com
> <mailto:g4mba5 at gmail.com>> wrote:
>
> Le 01/12/2020 à 16:12, Bruce Steers a écrit :
> >
> > forgot to mention I also added this to line 617 ..
> > * $hEditor.Insert("\n\nPrivate $" & sName & " As " & sType & gb.Lf)
> > *
> >
>
> Otherwise, you can use the syntax:
>
> Property FooBar As String Use $sFooBar
>
> It's faster to write!
>
> https://gambaswiki.org/wiki/lang/propdecl
> <https://gambaswiki.org/wiki/lang/propdecl>
>
> Regards,
>
> --
> Benoît Minisini
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette
> <http://gambaswiki.org/wiki/doc/netiquette> ]----
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201202/553587de/attachment.htm>
More information about the User
mailing list