Procedure Folding

Post

Posted
Rating:
#1 (In Topic #780)
Avatar
Enthusiast
GrayGhost is in the usergroup ‘Enthusiast’
Procedure Folding is a great way to temporarily hide clutter in your editor.

First of all go to menu Tools > Preferences > Editor and ensure that Procedure Folding is enabled.


In the code Editor, click on the minus (-) to the left of the procedure to fold it. All text in the procedure will now be hidden, with just the procedure declaration and a plus sign (+) visible.

In the past this has worked …. now it will not work ?
the "-" shows up but when I click on it nothing happenes.
could it be related to the components I have chosen ?
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Guru
cogier is in the usergroup ‘Guru’
Try [Ctr]+[Alt]+[Enter] to fold all the routines, or [Ctr]+[Enter] for a single routine.

All working fine here on 3.16.3 Stable.

<IMG src="https://www.cogier.com/gambas/Folding.png"> </IMG>
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Enthusiast
GrayGhost is in the usergroup ‘Enthusiast’
That works … thanks

That makes the program seem much more manageable   :lol:
Online now: No Back to the top

Post

Posted
Rating:
#4
Avatar
Regular
stevedee is in the usergroup ‘Regular’

grayghost4 said

…In the past this has worked …. now it will not work ?
the "-" shows up but when I click on it nothing happens…

Yes I'm sure its changed. You now need to hold down <shift> while clicking the + or -
Online now: No Back to the top

Post

Posted
Rating:
#5
Avatar
Guru
cogier is in the usergroup ‘Guru’

stevedee said


Yes I'm sure its changed. You now need to hold down <shift> while clicking the + or -

I have just tried again, and I don't need the [Shift] key, just a click on the minus sign does the job.
Online now: No Back to the top

Post

Posted
Rating:
#6
Avatar
Regular
stevedee is in the usergroup ‘Regular’

cogier said

…just a click on the minus sign does the job.

Thanks Charlie, there must be something odd about my system…and I've already changed the original Did You Know post!

edit: actually, if grayghost4  has the same problem, then its not just me.
Online now: No Back to the top

Post

Posted
Rating:
#7
Avatar
Enthusiast
GrayGhost is in the usergroup ‘Enthusiast’
 Could it because using gtk  vs. QT

I am using gtk




Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#8
Avatar
Expert
Quincunxian is in the usergroup ‘Expert’
The same thing happens to me intermittently.
I've been searching for a common factor for several months but can't find anything.
Sometimes restarting the Gambas instance helps, sometimes a full reboot helps.

Have been working on the same project over a long period of time, and when it happens, the Ctl-Enter solution always works as the fall-back.
Given that it's the same project and the components haven't changed since the start, logic would dictate that it's not a GTK / QT thing.

For any given project, you will have a .settings file in the project folder.
At the bottom of this file, will be a [OpenFile] entry. This shows all open files in the GUI and their fold settings.
This is a copy of a current project of mine.
The folder number as shown is the 'blank' number that has the displayed line between code Subs & Functions.
With this example line [ File[7]=".src/Cls_ToolBox_Folders.class:3.56" ] I'm not sure what the '3.56' relates to ?

Code (gambas)

  1. [OpenFile]
  2. Count=7
  3. Active=7
  4. File[1]=".src/Frm_Main.form"
  5. File[2]=".src/Frm_Main.class:2.1250"
  6. Fold[2]=[72,78,85,190,200,297,317,452,599,650,785,946,1022,1094,1106,1117,1130,1158,1164,1188,1225,1234,1241,1250,1261,1277,1285,1291,1302,1309,1319,1325,1334,1342,1348,1354,1360,1366,1372,1381,1401,1412,1425,1433,1446,1455,1470,1476,1482,1496,1505,1516,1522,1532,1542,1560,1566,1610,1616,1628,1634,1644,1660,1667,1676,1682,1688,1694,1717,1743,1762,1769,1775,1789,1803,1809]
  7. File[3]=".src/Frm_HelpMenu.form"
  8. File[4]=".src/Cls_ToolBox_Forms.class:37.209"
  9. File[5]=".src/AE.module:0.148"
  10. File[6]=".src/AG.module:28.38"
  11. File[7]=".src/Cls_ToolBox_Folders.class:3.56"
  12. Fold[7]=[0,30,36,56]
  13.  

I've tried to find something wrong, but it all appears to be working as it should be. All the forms/line numbers match up.
I have a feeling that it's in the code directly related to the GUI editor.

Cheers - Quin.
I code therefore I am
Online now: No Back to the top

Post

Posted
Rating:
#9
Guru
BruceSteers is in the usergroup ‘Guru’

Quincunxian said

With this example line [ File[7]=".src/Cls_ToolBox_Folders.class:3.56" ] I'm not sure what the '3.56' relates to ?

Cursor position i think
Online now: No Back to the top

Post

Posted
Rating:
#10
Avatar
Expert
Quincunxian is in the usergroup ‘Expert’
 Yeah I thought that too, but when I checked, the cursor was on a different line.
There may be some 'offset' involved though.

I placed the cursor at line 130 at column 2, then did a full save.
This is the line in the file : File[4]=".src/Cls_ToolBox_Forms.class:37.209"
Moved the tab in GUI and that had no effect either.

{working on this while posting}

Set the cursor to 1:372
Closed the Gambas instance then reopened it and the cursor was set to an offset of 1 on each.
File[3]=".src/Cls_ToolBox_Forms.class:2.373"

So it is a cursor position, but only updates when closing the instance - which appears a bit strange.
I also tried setting the cursor position to somewhere else, saving and then closing the tab for the class.
The cursor appears when I left it when opening the file for edit again - which means that is being saved elsewhere.
The .settings file was unchanged - seems to be a state save when the Gambas GUI interface is closed.

Cheers - Quin.
I code therefore I am
Online now: No Back to the top
1 guest and 0 members have just viewed this.