Need another approach for program

Post your Gambas programming questions here.
User avatar
sadams54
Regular
Posts: 181
Joined: Mon Jul 09, 2018 3:43 am
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.
User avatar
thatbruce
Regular
Posts: 296
Joined: Sat Sep 04, 2021 11:29 pm

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
Legend
Posts: 2134
Joined: Thu Jul 23, 2020 5:20 pm
Location: Isle of Wight

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.
User avatar
sadams54
Regular
Posts: 181
Joined: Mon Jul 09, 2018 3:43 am
Contact:

Re: Need another approach for program

Post by sadams54 »

you are just an amazing source of information.
Post Reply