Sybase, Inc. Navigational Bar

Powersoft Tools

Tip #5 - Some Quick Tips

Dear Developers,

Last week, I received some questions concerning the navigation of our editor. The following are some answers to these questions.

Screen Shot

Q. When I change a function or method prototype in my main body of code, how do I quickly change it's prototype in the header?

A. When changing a function or method prototype in the editor, you can easily right-click on its name and select the Open Prototype option in the pop-up menu. This can also be reached by highlighting the method name and pressing F6. In the example to the right, I had changed the parameters of my Foo method contained within my (extremely small) NewClass class to accept a WString pointer instead of a void. By right-clicking on the method name, and clicking on the Open Prototype option, the cursor is placed up at the prototype seen at the top of the code window. This example is a very small case, but when a C++ file can have ten classes with forty or more methods per class, this functionality proves its worth after its first use.

Screen Shot

Q. If I want to call a method that I have written, how can I quickly check what parameters it takes, or how the information in the parameters will be used?

A. After typing in the name of the method you wish to call, you can right-click on the name and select Open Source For 'Method Name'. This will then move the cursor to the definition of the method in question, and you may view the parameters, change them if you want, and view how the method manipulates the parameters received. In the example to the left, I have created a method called Fee in which I wish to call the method Foo. Having forgotten what parameters the method takes, I simply right-clicked on the name Foo, selected the Open Source For 'Foo' option, and the cursor was taken to that point for me to look at the function. Also, note the Find 'Foo' in Project option listed in the pop-up menu. This enables you to find the method or function if it exists outside of the current class, editor, or in an imported C++ source file - this is useful when managing large projects with multiple developers, requiring multiple classes.

Once again, this is a trivial case, since the class is about as small as they get. But if you were to write a class with dozens or even hundreds of methods or events (as an example, look at the list of DataWindow methods and events), then it becomes clear that this is a very useful tool for keeping track of which methods do what, and what their parameters are.

Screen Shot

Q. How can I quickly get help on compiling and linking errors?

A. By right-clicking on an error message, you can click on the Help on 'Error message' to get a context sensitive help window, expanding on the error message given in the editor. In this simple example, I misspelled Foo as Fooo, and it came up with a relatively complete error message. However, when the error messages require clarification of their brief format, then it is quite often very useful to expand the error message with this tool. This tool is also available when an error log appears reporting errors in the linking stage of building your project.



Click here to see Tip#6

Return to Power++ Home Page.


to top of page

Copyright © 1999 Sybase, Inc. All Rights Reserved.
Privacy Policy
Legal