Dec 94 Top 10
|Column Tag:||Think Top 10
Think Top 10
By Mark B. Baldwin and Michael Hopkins, Symantec Technical Support
This monthly column, written by Symantecs Technical Support Engineers, aims to provide you with information on Symantec products. Each month we cover either a specific application of tools or a Q&A list.
Q. How do I get the menu item Look up in Think Reference to work? Whenever I select it, I get an error message Cannot find Think Reference.
A. Think Reference is located in the folder Development:Online Documentation. Make an alias of the Think Reference application and move it to the folder named (Tools). Change the alias name from Think Reference alias to Think Reference.
Make sure to remove the space at the end of the alias name as well.
Q. Where do I get headers for QuickDraw GX and the Thread Manager?
A. The headers will be available on the next Developers Advantage CD. If you are a current subscriber, it will be sent to you automatically. Otherwise, you can order the Developers Advantage CD by calling 1-800-441-7234.
Q. When I look at a variable in the Debugger, I see two diamonds and an out of memory error instead of my variable. What can I do to fix this?
A. The usually happens when the Debugger information has been corrupted. To fix this, you should
Choose Options from the Edit menu
Choose Think Project Manager from the hierarchical menu
Go to the Debugging page and turn on Store debugging information externally.
Trash the all the .XSYM files for your project. They are found in the .XSYM folder in your current project folder
Sometimes it is necessary to remove the problematic files and re-add them to the project. In severe cases, use the AppleScripts Save File as Text and Create Project from Text to recover the project.
Q. I am having sporadic problems with the Symantec Debugger since Ive installed System 7.5. Is there a fix available?
A. There is a known incompatibility with the Symantec Debugger and System 7.5. We have worked closely with Apple to resolve the problem. A free, on-line patch (version 7.0.4) fixes this problem. The v7.0.4 patches are available on the following services:
AppleLink Third Parties:Third Parties (P-Z):Symantec
Solutions:Software Updates & Solutions:Think C/Symantec C++ Updates:
CompuServe GO SYMDEVTOOL (Libraries 2 and 11)
AOL Keyword: SYMANTEC (in our software library)
Symantec BBS GO /SymCMac (or GO /ThinkC)
Internet/FTP devtools.symantec.com Macintosh/Updates/
Q. Why do I get a syntax error in a class declaration in BRClaInfo.h while compiling?
A. You probably have a file that has a .c extension with a class definition in your project file. When compiling a C++ project, you will get this error. To fix this, rename the offending source file to a .cp extension and add it to your project.
Q. Why does my window draw with a different size than I expect when I use CDecorator::PlaceNewWindow()?
A. PlaceNewWindow() resets the sizeRect data member of the window. You can override this functionality in a derived class or not use the CDecorator class to place your window.
Q. When I am using CSaver, I get a link error for PutObject() and GetObject(). How do I resolve this link error?
A. To resolve this error, you will need to create a source file called CStream_myContents.cp. The contents of which should look something like the following:
/* 1 */
#pragma template_access public
#pragma template PutObject(CStream&, myContents*)
#pragma template GetObject(CStream&, myContents*&)
#pragma template PutObjectReference(CStream&, myContents*)
Q. I am trying to create an AppleScript to build a project with no user interaction. I am having trouble with the save script command. When I use the Script Editor to record the steps for building an application, the Script Editor generates the script command save project document ABC Publish.x as a project type. When running the script, I get an error: THINK Project Manager got an error: Cant make some data into the expected type. How can I edit the script so that it works correctly?
A. The following script will do the trick:
/* 2 */
tell application "THINK Project Manager"
compile project document 1
save project document "testtypes.1" to file
as a "PRTP"
Q. When I create a class which has a member function called SetItem(), I get a preprocessor error, Three actual arguments expected for item. when trying to compile. Why doesnt this work?
A. In the new universal headers, Apple changed the names of the GetItem and SetItem functions in <Menus.h> and added macros using the old names for backward compatibility. Unfortunately, these new macros will break all code that uses the identifiers GetItem and SetItem.
In order to fix this, in :Mac #includes:Universal Headers:<ConditionalMacros.h>, change #define OLDROUTINENAMES 1 to #define OLDROUTINENAMES 0 and then re-precompile <MacHeaders> and <MacHeaders++>. This will disable the new macros in <Menus.h> and in other headers. As a consequence, you will get missing prototype errors if your program uses the old function names.
Q. When I compile a project, I get an error Stack approaching limit. Use #pragma large stack. When I use #pragma large stack, I get a syntax error. Why?
A. The directive #pragma large stack is not recognized by the current compiler. However, this message indicates that you are dangerously close to a code overflow. You should reduce the number of static variables in the offending source file. Alternatively, you can dynamically allocate your variables to reduce stack requirements.