[Gambas-user] customising my gambas TextEditorMode
bsteers4 at gmail.com
Tue Dec 1 16:08:16 CET 2020
Never mind i found it :)
If anyone else finds this post looking to do the same type of mod I did
I changed the *InsertFunction*() parameters on lines 619 and 621, added an
additional optional field..
*InsertFunction(sName & "_Read", sType, False, "", bStatic, "Return $" &
* InsertFunction(sName & "_Write", "", False, "Value As " & sType, bStatic,
"$" & sName & " = Value")*
The last parameters are new " *Optional sInsertString As String*"
The write commands in *InsertFunction*() at line 514 now look like this..
* If sType Then $hEditor.Insert("\n" & sStatic & sPublic & " Function "
& sProc & "(" & sSign & ") As " & sType & "\n\n" & Space$(Project.TabSize)
& IIf(sInsertString, sInsertString, "") & "\n\nEnd\n") Else
$hEditor.Insert("\n" & sStatic & sPublic & " Sub " & sProc & "(" & sSign &
")\n\n" & Space$(Project.TabSize) & IIf(sInsertString, sInsertString, "") &
Got my gambas doing this now...
Loving it, that'll save me some typing :)
On Fri, 27 Nov 2020 at 19:40, Bruce Steers <bsteers4 at gmail.com> wrote:
> I'm trying to customise my gambas a bit. but i cannot find the code (not
> for a lack of looking)
> What i want to do is alter the auto-fill when i type a property.
> If i type for example ..
> *Property Runable As Boolean* (then hit return)
> I get automatically written at the bottom of my file
> *Private Function Runable_Read() As Boolean EndPrivate Sub
> Runable_Write(Value As Boolean)End*
> That's awesome but i want it to add something more like this ...
> *Private $Runable As Boolean *(this added just below the property
> *Private Function Runable_Read() As BooleanReturn $RunableEndPrivate Sub
> Runable_Write(Value As Boolean)*
> *$Runable = Value *
> Have been through the highlight and mode and editor code but not seeing
> where it happens to modify it, ?
> all the best
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User