Need another approach for program

Post your Gambas programming questions here.
User avatar
sadams54
Posts: 166
Joined: Monday 9th July 2018 3:43am
Contact:

Re: Need another approach for program

Post by sadams54 »

I tried the left alt shift return thing and it did not do what you thought. It created 2 subs for the variable.
Online
User avatar
thatbruce
Posts: 225
Joined: Saturday 4th September 2021 11:29pm

Re: Need another approach for program

Post by thatbruce »

I tried the left alt shift return thing also and it did horrible things to the code folding.

I have a code snippet "pru" that inserts a proper Property line here. It is
Property ${1:Name} As ${2:Type} Use $${3:VarName}


Everyone should know how to use snippets! If not check here: https://gambaswiki.org/wiki/ide/idesnippets

b
User avatar
BruceSteers
Posts: 1831
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Need another approach for program

Post by BruceSteers »

Oops sorry it must be my code.
I found the function that auto prints the properties Read/Write methods and made some mods :)

If i type
Property Name As String

Pressing LAlt-Shift-Return does this...
Property Name As String Use $sName


Pressing LAlt-Return does all this... (minus my comments)
Property Name As String

Private $sName As String  ' this line is printed under the Property definition

' these lines are printed at the bottom of the page
Private Function Name_Read() As String

  Return $sName

End

Private Sub Name_Write(Value As String)

  $sName = Value

End



Hehe :)

Step 1: Start compiling and installing gambas from source not packages.
Step 2: Realize the IDE is written in gambas and is an editable project you can load into the gambas IDE.
Step 3: Study the code till your eyes hurt. walk through it like a human debugger on step mode.
Step 4: Make your IDE do all kinds of things that you personally want it to without having to hassle Benoit :)

God I love gambas :)

But apologies for the misguided key code suggestion. I though the lalt-shift one was Bens code, i guess not.
If at first you don't succeed , try doing something differently.
BruceS
User avatar
sadams54
Posts: 166
Joined: Monday 9th July 2018 3:43am
Contact:

Re: Need another approach for program

Post by sadams54 »

you are just an amazing source of information.
Post Reply