TweetFollow Us on Twitter

Mar 97 Top 10

Volume Number: 13 (1997)
Issue Number: 3
Column Tag: Symantec Top Ten

Symantec Top 10

By Richard Hill, Symantec Technical Support

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

Q: My Visual Architect project uses a modal dialog that I want to be able to make appear and disappear without repeatedly allocating and releasing resources. How would I do this?

A: While not immediately obvious, the answer to this is fairly simple. Since CDialog and CDLOGDialog are descendants of CWindow, you can use CWindow's member functions Hide() and Show() to control visibility. To make the dialog ‘go away' without releasing its resources use myDialog->Hide(). Whether it is visible or not, you can update its contents to your liking. Re-display it at the appropriate time with myDialog->Show().

Q: My Symantec C++ Project will not run under the debugger. What might be the problem?

A: There are a couple different reasons for this problem. The most common culprit is corruption in one of your built objects. Choosing Remove Objects from the Build menu is the easiest way to deal with this offender. Another less common (but just as obtrusive) condition has to do with the Project Type setting in the Project | Options submenu. If either Shared or Static Library is selected for the project type, the debugger will be disabled for this project. If the type has been erroneously set to a library, set it back to Application and then Remove Objects from the Build menu. All should be well.

Q: My loop control condition in C is not evaluating correctly. I know x has reached 10, but control is staying in the loop. What's going on?

while (x>10)

{

x = x/y + ...;

}

A: The problem here has to do with rounding and floating point precision. Try this instead:

while (abs(x-10) > 0.0000001)

Obviously, you can change the precision level by changing how many decimal places to use.

Q: My Java applet is accessing an SQL database through dbANYWHERE. The data in my result set is acting weird. Among other things, my comparisons are not evaluating they way I know they should.

A: As it turns out, some SQL databases return their data padded to the length of the field (as defined in the database) plus 1 character (the delimiter). Luckily, Sun included a trim() method in the java.lang.String class. If the database you are connecting to returns padded strings, get in the habit of calling myString = myString.trim().

Q: I want to use a String as my conditional but (myString == the text) is not evaluating true when I know it should.

A: The problem here is that Java defines a String as an object, not a primary data type. You can still do what you want, you just have to use the String member function .equals(). Try this instead: if (myString.equals("the text") {}. This will evaluate to true when it should.

Q: I really love Symantec C++ and think it is the best development environment around, but I have to do some development using libraries that only exist for Metrowerks CodeWarrior . What can I do?

A: Rest at ease. We have developed a translator that allows you to use the MW libraries transparently with your Symantec C++ projects. The translator should be available at our WWW site (ftp.symantec.com) by the time this goes to print.

Q: I have been using Symantec Café (developer release) for some time now. I just upgraded my Mac and now Café will not compile anything. What is going on?

A: If you just copied the Symantec Café folder from one drive to another, rather than reinstalling on the new drive, you may be having a problem with an alias. In the (Translators) folder there is an alias called Java. This alias needs to be pointing to the Java file in your (Java Libraries) folder. If it is not, your project will refuse to compile.

Q: I want to be able to display my source code in an html file, but when I try I lose my formatting, and it makes the code very difficult to read.

A: Try copy and pasting your nicely formatted text from your editor window into a Visual Page window. Now select your code in the Visual Page window and select Preformatted from the Format menu. This method will retain all of your formatting and is the method we use here at Symantec. Another way to accomplish something similar is to drag a source code file to a Visual Page window. However, you may lose some formatting information like fonts and color using this method. It depends on whether your editor saves the formatting information in the file or determines it ‘on the fly'.

Q: How can I change the transparency setting of an image in Visual Page?

A: There are two ways to get to the right place for this. One is to Open the graphic image from the File menu. The quicker method is to hold down the Option key while double clicking on the displayed image. Either way will take you to an editing view for the image. Here you can choose what color (if any) to make transparent. You can define your imagemap regions and links here as well.

Q: I can not get my Java application to access a files that I know are on my drive. What is wrong?

A: Many Macintosh users are in the habit of naming their folders with a suffix of ‘ƒ' (Option-f). Unfortunately, the character set that Java supports for its paths does not include this character (among others). If you are having problems with folder or file access, check to see if any of the folders have any unusual characters and remove them.

Special Thanks to Mark Baldwin, Bob Meyer, Steve Howard, Kevin Kenan, and Steve Wolf.

 

Community Search:
MacTech Search:

Software Updates via MacUpdate

Latest Forum Discussions

See All

Whitethorn Games combines two completely...
If you have ever gone fishing then you know that it is a lesson in patience, sitting around waiting for a bite that may never come. Well, that's because you have been doing it wrong, since as Whitehorn Games now demonstrates in new release Skate... | Read more »
Call of Duty Warzone is a Waiting Simula...
It's always fun when a splashy multiplayer game comes to mobile because they are few and far between, so I was excited to see the notification about Call of Duty: Warzone Mobile (finally) launching last week and wanted to try it out. As someone who... | Read more »
Albion Online introduces some massive ne...
Sandbox Interactive has announced an upcoming update to its flagship MMORPG Albion Online, containing massive updates to its existing guild Vs guild systems. Someone clearly rewatched the Helms Deep battle in Lord of the Rings and spent the next... | Read more »
Chucklefish announces launch date of the...
Chucklefish, the indie London-based team we probably all know from developing Terraria or their stint publishing Stardew Valley, has revealed the mobile release date for roguelike deck-builder Wildfrost. Developed by Gaziter and Deadpan Games, the... | Read more »
Netmarble opens pre-registration for act...
It has been close to three years since Netmarble announced they would be adapting the smash series Solo Leveling into a video game, and at last, they have announced the opening of pre-orders for Solo Leveling: Arise. [Read more] | Read more »
PUBG Mobile celebrates sixth anniversary...
For the past six years, PUBG Mobile has been one of the most popular shooters you can play in the palm of your hand, and Krafton is celebrating this milestone and many years of ups by teaming up with hit music man JVKE to create a special song for... | Read more »
ASTRA: Knights of Veda refuse to pump th...
In perhaps the most recent example of being incredibly eager, ASTRA: Knights of Veda has dropped its second collaboration with South Korean boyband Seventeen, named so as it consists of exactly thirteen members and a video collaboration with Lee... | Read more »
Collect all your cats and caterpillars a...
If you are growing tired of trying to build a town with your phone by using it as a tiny, ineffectual shover then fear no longer, as Independent Arts Software has announced the upcoming release of Construction Simulator 4, from the critically... | Read more »
Backbone complete its lineup of 2nd Gene...
With all the ports of big AAA games that have been coming to mobile, it is becoming more convenient than ever to own a good controller, and to help with this Backbone has announced the completion of their 2nd generation product lineup with their... | Read more »
Zenless Zone Zero opens entries for its...
miHoYo, aka HoYoverse, has become such a big name in mobile gaming that it's hard to believe that arguably their flagship title, Genshin Impact, is only three and a half years old. Now, they continue the road to the next title in their world, with... | Read more »

Price Scanner via MacPrices.net

B&H has Apple’s 13-inch M2 MacBook Airs o...
B&H Photo has 13″ MacBook Airs with M2 CPUs and 256GB of storage in stock and on sale for up to $150 off Apple’s new MSRP, starting at only $849. Free 1-2 day delivery is available to most US... Read more
M2 Mac minis on sale for $100-$200 off MSRP,...
B&H Photo has Apple’s M2-powered Mac minis back in stock and on sale today for $100-$200 off MSRP. Free 1-2 day shipping is available for most US addresses: – Mac mini M2/256GB SSD: $499, save $... Read more
Mac Studios with M2 Max and M2 Ultra CPUs on...
B&H Photo has standard-configuration Mac Studios with Apple’s M2 Max & Ultra CPUs in stock today and on Easter sale for $200 off MSRP. Their prices are the lowest available for these models... Read more
Deal Alert! B&H Photo has Apple’s 14-inch...
B&H Photo has new Gray and Black 14″ M3, M3 Pro, and M3 Max MacBook Pros on sale for $200-$300 off MSRP, starting at only $1399. B&H offers free 1-2 day delivery to most US addresses: – 14″ 8... Read more
Department Of Justice Sets Sights On Apple In...
NEWS – The ball has finally dropped on the big Apple. The ball (metaphorically speaking) — an antitrust lawsuit filed in the U.S. on March 21 by the Department of Justice (DOJ) — came down following... Read more
New 13-inch M3 MacBook Air on sale for $999,...
Amazon has Apple’s new 13″ M3 MacBook Air on sale for $100 off MSRP for the first time, now just $999 shipped. Shipping is free: – 13″ MacBook Air (8GB RAM/256GB SSD/Space Gray): $999 $100 off MSRP... Read more
Amazon has Apple’s 9th-generation WiFi iPads...
Amazon has Apple’s 9th generation 10.2″ WiFi iPads on sale for $80-$100 off MSRP, starting only $249. Their prices are the lowest available for new iPads anywhere: – 10″ 64GB WiFi iPad (Space Gray or... Read more
Discounted 14-inch M3 MacBook Pros with 16GB...
Apple retailer Expercom has 14″ MacBook Pros with M3 CPUs and 16GB of standard memory discounted by up to $120 off Apple’s MSRP: – 14″ M3 MacBook Pro (16GB RAM/256GB SSD): $1691.06 $108 off MSRP – 14... Read more
Clearance 15-inch M2 MacBook Airs on sale for...
B&H Photo has Apple’s 15″ MacBook Airs with M2 CPUs (8GB RAM/256GB SSD) in stock today and on clearance sale for $999 in all four colors. Free 1-2 delivery is available to most US addresses.... Read more
Clearance 13-inch M1 MacBook Airs drop to onl...
B&H has Apple’s base 13″ M1 MacBook Air (Space Gray, Silver, & Gold) in stock and on clearance sale today for $300 off MSRP, only $699. Free 1-2 day shipping is available to most addresses in... Read more

Jobs Board

Medical Assistant - Surgical Oncology- *Apple...
Medical Assistant - Surgical Oncology- Apple Hill Location: WellSpan Medical Group, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Apply Read more
Omnichannel Associate - *Apple* Blossom Mal...
Omnichannel Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Cashier - *Apple* Blossom Mall - JCPenney (...
Cashier - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Blossom Mall Read more
Operations Associate - *Apple* Blossom Mall...
Operations Associate - Apple Blossom Mall Location:Winchester, VA, United States (https://jobs.jcp.com/jobs/location/191170/winchester-va-united-states) - Apple Read more
Business Analyst | *Apple* Pay - Banco Popu...
Business Analyst | Apple PayApply now " Apply now + Apply Now + Start applying with LinkedIn Start + Please wait Date:Mar 19, 2024 Location: San Juan-Cupey, PR Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.