• MacTech Network:
  • Tech Support
  • |
  • MacForge.net
  • |
  • Apple News
  • |
  • Register Domains
  • |
  • SSL Certificates
  • |
  • iPod Deals
  • |
  • Mac Deals
  • |
  • Mac Book Shelf

MAC TECH

  • Home
  • Magazine
    • About MacTech in Print
    • Issue Table of Contents
    • Subscribe
    • Risk Free Sample
    • Back Issues
    • MacTech DVD
  • Archives
    • MacTech Print Archives
    • MacMod
    • MacTutor
    • FrameWorks
    • develop
  • Forums
  • News
    • MacTech News
    • MacTech Blog
    • MacTech Reviews and KoolTools
    • Whitepapers, Screencasts, Videos and Books
    • News Scanner
    • Rumors Scanner
    • Documentation Scanner
    • Submit News or PR
    • MacTech News List
  • Store
  • Apple Expo
    • by Category
    • by Company
    • by Product
  • Job Board
  • Editorial
    • Submit News or PR
    • Writer's Kit
    • Editorial Staff
    • Editorial Calendar
  • Advertising
    • Benefits of MacTech
    • Mechanicals and Submission
    • Dates and Deadlines
    • Submit Apple Expo Entry
  • User
    • Register for Ongoing Raffles
    • Register new user
    • Edit User Settings
    • Logout
  • Contact
    • Customer Service
    • Webmaster Feedback
    • Submit News or PR
    • Suggest an article
  • Connect Tools
    • MacTech Live Podcast
    • RSS Feeds
    • Twitter

ADVERTISEMENT
Volume Number:11
Issue Number:8
Column Tag:Symantec Top 10

Symantec Top 10

This monthly column, written by Symantec’s Technical Support Engineers, aims to provide you with technical information based on the use of Symantec products.

By Glenn L. Austin and Levi Brown

Note: Source code files accompanying article are located on MacTech CD-ROM or source code disks.

Q: When I save the position of hidden windows in TCL, they always end up at the top-left of the screen rather than where they were actually located. What’s happening?

A: CWindow::FrameToGlobalR() currently assumes that the window is visible when it is called. Therefore, you need to insert the following lines into CWindow::FrameToGlobalR() above the line which starts off with:

 offset = topLeft((**((WindowPeek

and insert this code:

 if (!visible)
 {
 CView* oldPView = cPreparedView;

 Prepare();
 offset.v = offset.h = 0;
 LocalToGlobal(&offset);

 if (oldPView)
 oldPView->Prepare();
 }
 else

Q: Why does the amount of free memory go down every time I bring up a window which contains a CArrayPane?

A: There is a problem with CArray::GetFrom. Just before the line which reads:

 hItems = NewHandleCanFail(elementSize);

insert the line:

 TCLForgetHandle(hItems);

Q: When I’m building static libraries, I keep getting the error:

PPCLink encountered an error

# Error:  Non-shared libraries do not support "-main main"
# Error:  (3015) While writing 
PowerMac:Development:staticlib:staticlib1.o
# Error:  
# Fatal error: 
PPCLink - Execution terminated!

from Symantec C++ 8.0. What does this mean?

A: Go to the Options menu, select Linker, select the “-main main” in PPCLink settings, and delete it.

Q: While debugging some optimized code using the THINK Debugger, I’m watching two of my variables in the Data window, and both of those variables are changing to the same value when one of the variables is changed. Why is that?

A: When you produce optimized code, the compiler will use a register for one variable, then reuse it for a different variable within the same function if it can do so safely. The debugger associates the two variables with the same register, and you see the variables’ values coincide.

Q: After updating to TCL 2.0.6, my applications now have a link error “CTableBorder::” not defined. Why?

A: CTableBorder was added in TCL 2.0.6, but the source file CTableBorder.cp hasn’t been added to your project. Add the CTableBorder.cp file in the Table Classes folder to the Table segment of your project.

Q: The active border for a CTable doesn’t get drawn in 2.0.6. Why?

A: The table has already become the gopher by the time the border would be drawn. Change CTable::BecomeGopher() from:

 if (fBecoming)
 {
 if (gGopher != this)

to:

 if (fBecoming)
 {
 if (gGopher == this)

Q: I’m having problems with strcat in Symantec C++ 8.0 trashing memory. What’s wrong?

A: There is a problem in strcat when the second string is an empty string. There are three options to dealing with this string:

(1) Use the C version of str.c rather than str.asm.

(2) explicitly test for an empty string, ie.

 if (*t)
 strcat(s, t);

or

(3) download the script to fix the bug in str.a from ftp.symantec.com. The script is located in:

ftp://ftp.symantec.com/public/devtool/mac/updaters/ 
sym.cpp-va-tcl.updates/str.c.update.hqx

Q: I get an “undefined identifier ‘__nan’” when I include complex.h in my .cp files and bring my project up to date. What is wrong?

A: Go to the Think Project Manager’s Edit menu, select Options and choose the Symantec C++ sub-option. Choose Language Settings in the popup menu and uncheck the ANSI Conformance checkbox. Also, be sure to add the “Complex” library from the Standard Libraries to your project.

Q: I’ve got a 68K program which uses floating point. How do I convert it to run on the PowerMac?

A: The basic solution is to use fp.h rather than math.h or SANE.h. fp.h will automatically include the proper header for the 68K or PPC compiler, SANE.h or PowerPCfp.h.

Q: I’m having problems accessing devtools.symantec.com. Why?

A: In order to consolidate our services, all of our files have been moved to ftp://ftp.symantec.com/public/devtool/mac, as well as our WWW service at http://www.symantec.com

Special thanks to Mark Baldwin, Craig Conner, Rick Hartmann, Michael Hopkins, Steve Howard, Noah Lieberman, Andy McFarland, Scott Morison, and Kevin Quah.

 
MacTech Only Search:
Community Search:

 
 
 

 
 
 
 
 
  • SPREAD THE WORD:
  • Slashdot
  • Digg
  • Del.icio.us
  • Reddit
  • Newsvine
  • Generate a short URL for this page:



MacTech Magazine. www.mactech.com
Toll Free 877-MACTECH, Outside US/Canada: 805-494-9797
MacTech is a registered trademark of Xplain Corporation. Xplain, "The journal of Apple technology", Apple Expo, Explain It, MacDev, MacDev-1, THINK Reference, NetProfessional, Apple Expo, MacTech Central, MacTech Domains, MacNews, MacForge, and the MacTutorMan are trademarks or service marks of Xplain Corporation. Sprocket is a registered trademark of eSprocket Corporation. Other trademarks and copyrights appearing in this printing or software remain the property of their respective holders.
All contents are Copyright 1984-2010 by Xplain Corporation. All rights reserved. Theme designed by Icreon.
 
Nov. 20: Take Control of Syncing Data in Sow Leopard' released
Nov. 19: Cocktail 4.5 (Leopard Edition) released
Nov. 19: macProVideo offers new Cubase tutorials
Nov. 18: S Stardom anounces Safe Capsule, a companion piece for Apple's
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live