Author Topic: Collapsible subs  (Read 4726 times)

0 Members and 1 Guest are viewing this topic.

Offline b@nditoTopic starter

  • Jr. Member
  • **
  • Posts: 48
  • Activity:
    0%
  • Reputation Power: 0
  • b@ndito has no influence.
  • Respect: +5
  • Referrals: 0
    • View Profile
Collapsible subs
« on: July 13, 2010, 04:47:37 AM »
0
Actually i'm using another editor instead of suo with a customized config made to recognise easyuo labels... i've found here a good feature that you may consider...

the editor recognise sub from sub starting from the first sub and closing it to the last return the parser would find before next sub start. it permits to highlight row numbers on the left column, and also puts a
  • sign to collapse the sub.


i try to show you an example,
sight before collapsing.
...
row 110
                 [ - ] sub example
                        set %variable ( somemaths )
                        if %variable = value
                        return %variable
row 115           set %anothervar (math)
                        if %anothervar = value
                        return %anothervar
                        return error
row 120
                 [ - ] sub anothersub
...

collapsed sub sight


...
row 110
               [ + ] sub example
row 120
                [ - ]  sub anothersub
...

i hope i to have explained enough with my poor english and you may find it usefull to improve SUO  :D
this technique is quite useful but limited if some code is beyond the last return, i.e. if you bump back the parser with a goto
« Last Edit: July 13, 2010, 04:59:15 AM by b@ndito »

Offline Xclio

  • Officially "The MAN"
  • Elite
  • *
  • *
  • Posts: 981
  • Activity:
    0%
  • Reputation Power: 9
  • Xclio has no influence.
  • Gender: Male
  • Respect: +56
  • Referrals: 1
    • View Profile
Re: Collapsible subs
« Reply #1 on: July 13, 2010, 06:07:43 AM »
0
That's an awesome idea!  I would love to see that implemented into SUO.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Collapsible subs
« Reply #2 on: July 13, 2010, 08:11:22 AM »
0
That's a feature that's built into the editor control I'm using.  I've tried a few times to unravel the mystery of that particular feature, but until now I've failed miserably.  There's just not enough sample code out there to help enlighten me, so I kinda gave up.  However, with the subs pane, you get just about as much mobility around a script that you'd get with code collapsing.

It's on my list to figure out one of these days.
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: