Author Topic: VB 6 functions & procedures  (Read 6522 times)

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
VB 6 functions & procedures
« on: November 09, 2006, 12:51:42 PM »
Hi,

I'm new to Slick Edit.  CodeWright was my editor for a long time, but the shortcomings drove me to look for something better, and Slickedit fits.  However, I had one thing in CodeWright that I have not been able to find (or setup) in Slickedit that I hope someone can help with.

In codeWright, there was a means of declaring outline symbols such that I could find, on the outline tab, a list of all the Functions, Procedures, Properties, etc. in my files.  This made it possible to quickly and easily jump to different sections of the file without scrolling.  The best part was that it parsed any file automatically (for .bas, .frm, etc.) so I simply opened the file and got to work.

Is there a way to do this in SlickEdit?  I jumped in feet first, so I've got an investment here.  I want to make full use of what's there.  I'm not afraid to work with filters if that's what it takes, but where do I go?

Thanks.
Jim Lang

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: VB 6 functions & procedures
« Reply #1 on: November 09, 2006, 02:46:02 PM »
I'm not familiar with the Outline tab from Codewright, and I'd like to hear more about it so we can see if this is something we can build. Can you describe how you "declare outline symbols" and how that controls the contents of the Outline tab?

If you're looking for a list of functions, procedures, properties, etc., you would use the Defs tab in SlickEdit. The Defs tab shows all of the definitions for the current file. This should be visible by default and docked on the left-hand side of the screen. If not, select View > Toolbars and put a check next to "Defs".

You can sort the symbols by line number or by name. To do so, right-click in the Defs tab window to bring up the context menu. There you will also find a number of filters to control visibility.

Let me know if I missed the mark with this one.

--Scott

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: VB 6 functions & procedures
« Reply #2 on: November 09, 2006, 03:36:28 PM »
Scott,

Thanks for the quick reply.  In short, the Outline tab looked for anything that was Public|Private|Global followed by Function|Property|Sub, then the next identifier after the second item.  So Public Sub Foo() would have "Foo" listed in the outline tab.   I had configs for Option, Declare, Function, Sub and Property.  They were set up with patterns (reg ex) such as
Code: [Select]
^[ \t]*(([Ss]tatic|[Pp]ublic|[Pp]rivate)[ \t]+)*Function[ \t]+[a-z0-9_]+\c[^a-z0-9_] which was used to rebuild the symbol file when needed.  Slick.

Frankly, it looks like Defs is what I'm after.  I just don't get the definitions for the current file.  I'm not sure what I'm missing, but based on the short time I've spent with it already, I'm fairly sure I have missed something. I have the options set to: Display files and Display non-taggable files, sort by function name.  I have 3 files open (one a .frm file, the other two .bas files) and one of the .bas files shows a Public Function, while none of the other functions or subs (or anything else) shows.  There is nothing particularly special about any of the functions or files.

Thanks again.
Jim Lang

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: VB 6 functions & procedures
« Reply #3 on: November 09, 2006, 05:56:06 PM »
It sounds like we're pretty close. The Defs tab relies on data from the context tagging engine to display the information. So, if things aren't showing up for some files, it should be because they aren't being tagged.

SlickEdit tags all files that are added to a project in your workspace. With VB and other Microsoft Visual Studio projects, you need to create a solution in Visual Studio so we can read it. Select Project > Open Workspace to open an existing Visual Studio solution or project. SlickEdit will then use all of the compiler settings you specify there and launch the build just as it would be launched from Visual Studio.

Much of the power of SlickEdit derives from our tagging engine, so it's essential that you are working in a properly configured workspace.

If I'm off in the wrong direction or you have additional questions, feel free to call me directly so I can help you out. Just call the main SlickEdit number, 919-473-0070, and ask for Scott Westfall. Be sure tell them you're following up from our conversation on the forum so they don't put you into voicemail--which may happen anyway if I'm in a meeting.

We're working on more comprehensive documentation in this area to help new users get started effectively with SlickEdit, and I really want to make sure I understand what's going on in this case.

--Scott

jimlangrunner

  • Senior Community Member
  • Posts: 360
  • Hero Points: 31
  • Jim Lang - always a student.
Re: VB 6 functions & procedures
« Reply #4 on: November 09, 2006, 09:47:18 PM »
Scott,

You're close, but off a little.  It's VB6, not part of a Visual Studio installation, so I don't have a Visual Studio solution to open.  The Visual Basic Project (.vbp) is not recognized by SlickEdit (at least, not without some add-in or something).  That's why I asked about "creating" the additional patterns.  I'm always looking at learning new things. 

Frankly, the product lives up to it's name (slick) and I'm really happy with it.  If I can get the outline working, I'll be ecstatic.  If not, I'll chalk it up to another reason to encourage the move away from VB 6 and live with it.

Thanks again.
Jim