TweetFollow Us on Twitter

Aug 95 Top 10
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.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Combo Quest (Games)
Combo Quest 1.0 Device: iOS Universal Category: Games Price: $.99, Version: 1.0 (iTunes) Description: Combo Quest is an epic, time tap role-playing adventure. In this unique masterpiece, you are a knight on a heroic quest to retrieve... | Read more »
Hero Emblems (Games)
Hero Emblems 1.0 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0 (iTunes) Description: ** 25% OFF for a limited time to celebrate the release ** ** Note for iPhone 6 user: If it doesn't run fullscreen on your device... | Read more »
Puzzle Blitz (Games)
Puzzle Blitz 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: Puzzle Blitz is a frantic puzzle solving race against the clock! Solve as many puzzles as you can, before time runs out! You have... | Read more »
Sky Patrol (Games)
Sky Patrol 1.0.1 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0.1 (iTunes) Description: 'Strategic Twist On The Classic Shooter Genre' - Indie Game Mag... | Read more »
The Princess Bride - The Official Game...
The Princess Bride - The Official Game 1.1 Device: iOS Universal Category: Games Price: $3.99, Version: 1.1 (iTunes) Description: An epic game based on the beloved classic movie? Inconceivable! Play the world of The Princess Bride... | Read more »
Frozen Synapse (Games)
Frozen Synapse 1.0 Device: iOS iPhone Category: Games Price: $2.99, Version: 1.0 (iTunes) Description: Frozen Synapse is a multi-award-winning tactical game. (Full cross-play with desktop and tablet versions) 9/10 Edge 9/10 Eurogamer... | Read more »
Space Marshals (Games)
Space Marshals 1.0.1 Device: iOS Universal Category: Games Price: $4.99, Version: 1.0.1 (iTunes) Description: ### IMPORTANT ### Please note that iPhone 4 is not supported. Space Marshals is a Sci-fi Wild West adventure taking place... | Read more »
Battle Slimes (Games)
Battle Slimes 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: BATTLE SLIMES is a fun local multiplayer game. Control speedy & bouncy slime blobs as you compete with friends and family.... | Read more »
Spectrum - 3D Avenue (Games)
Spectrum - 3D Avenue 1.0 Device: iOS Universal Category: Games Price: $2.99, Version: 1.0 (iTunes) Description: "Spectrum is a pretty cool take on twitchy/reaction-based gameplay with enough complexity and style to stand out from the... | Read more »
Drop Wizard (Games)
Drop Wizard 1.0 Device: iOS Universal Category: Games Price: $1.99, Version: 1.0 (iTunes) Description: Bring back the joy of arcade games! Drop Wizard is an action arcade game where you play as Teo, a wizard on a quest to save his... | Read more »

Price Scanner via MacPrices.net

Apple’s M4 Mac minis on sale for record-low p...
B&H Photo has M4 and M4 Pro Mac minis in stock and on sale right now for up to $150 off Apple’s MSRP, each including free 1-2 day shipping to most US addresses. Prices start at only $469: – M4... Read more
Deal Alert! Mac Studio with M4 Max CPU on sal...
B&H Photo has the standard-configuration Mac Studio model with Apple’s M4 Max CPU in stock today and on sale for $300 off MSRP, now $1699 (10-Core CPU and 32GB RAM/512GB SSD). B&H also... Read more

Jobs Board

All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.