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

The secrets of Penacony might soon come...
Version 2.2 of Honkai: Star Rail is on the horizon and brings the culmination of the Penacony adventure after quite the escalation in the latest story quests. To help you through this new expansion is the introduction of two powerful new... | Read more »
The Legend of Heroes: Trails of Cold Ste...
I adore game series that have connecting lore and stories, which of course means the Legend of Heroes is very dear to me, Trails lore has been building for two decades. Excitedly, the next stage is upon us as Userjoy has announced the upcoming... | Read more »
Go from lowly lizard to wicked Wyvern in...
Do you like questing, and do you like dragons? If not then boy is this not the announcement for you, as Loongcheer Game has unveiled Quest Dragon: Idle Mobile Game. Yes, it is amazing Square Enix hasn’t sued them for copyright infringement, but... | Read more »
Aether Gazer unveils Chapter 16 of its m...
After a bit of maintenance, Aether Gazer has released Chapter 16 of its main storyline, titled Night Parade of the Beasts. This big update brings a new character, a special outfit, some special limited-time events, and, of course, an engaging... | Read more »
Challenge those pesky wyverns to a dance...
After recently having you do battle against your foes by wildly flailing Hello Kitty and friends at them, GungHo Online has whipped out another surprising collaboration for Puzzle & Dragons. It is now time to beat your opponents by cha-cha... | Read more »
Pack a magnifying glass and practice you...
Somehow it has already been a year since Torchlight: Infinite launched, and XD Games is celebrating by blending in what sounds like a truly fantastic new update. Fans of Cthulhu rejoice, as Whispering Mist brings some horror elements, and tests... | Read more »
Summon your guild and prepare for war in...
Netmarble is making some pretty big moves with their latest update for Seven Knights Idle Adventure, with a bunch of interesting additions. Two new heroes enter the battle, there are events and bosses abound, and perhaps most interesting, a huge... | Read more »
Make the passage of time your plaything...
While some of us are still waiting for a chance to get our hands on Ash Prime - yes, don’t remind me I could currently buy him this month I’m barely hanging on - Digital Extremes has announced its next anticipated Prime Form for Warframe. Starting... | Read more »
If you can find it and fit through the d...
The holy trinity of amazing company names have come together, to release their equally amazing and adorable mobile game, Hamster Inn. Published by HyperBeard Games, and co-developed by Mum Not Proud and Little Sasquatch Studios, it's time to... | Read more »
Amikin Survival opens for pre-orders on...
Join me on the wonderful trip down the inspiration rabbit hole; much as Palworld seemingly “borrowed” many aspects from the hit Pokemon franchise, it is time for the heavily armed animal survival to also spawn some illegitimate children as Helio... | Read more »

Price Scanner via MacPrices.net

Apple AirPods Pro with USB-C return to all-ti...
Amazon has Apple’s AirPods Pro with USB-C in stock and on sale for $179.99 including free shipping. Their price is $70 (28%) off MSRP, and it’s currently the lowest price available for new AirPods... Read more
Apple Magic Keyboards for iPads are on sale f...
Amazon has Apple Magic Keyboards for iPads on sale today for up to $70 off MSRP, shipping included: – Magic Keyboard for 10th-generation Apple iPad: $199, save $50 – Magic Keyboard for 11″ iPad Pro/... Read more
Apple’s 13-inch M2 MacBook Airs return to rec...
Apple retailers have 13″ MacBook Airs with M2 CPUs in stock and on sale this weekend starting at only $849 in Space Gray, Silver, Starlight, and Midnight colors. These are the lowest prices currently... Read more
Best Buy is clearing out iPad Airs for up to...
In advance of next week’s probably release of new and updated iPad Airs, Best Buy has 10.9″ M1 WiFi iPad Airs on record-low sale prices for up to $200 off Apple’s MSRP, starting at $399. Sale prices... Read more
Every version of Apple Pencil is on sale toda...
Best Buy has all Apple Pencils on sale today for $79, ranging up to 39% off MSRP for some models. Sale prices for online orders only, in-store prices may vary. Order online and choose free shipping... Read more
Sunday Sale: Apple Studio Display with Standa...
Amazon has the standard-glass Apple Studio Display on sale for $300 off MSRP for a limited time. Shipping is free: – Studio Display (Standard glass): $1299.97 $300 off MSRP For the latest prices and... Read more
Apple is offering significant discounts on 16...
Apple has a full line of 16″ M3 Pro and M3 Max MacBook Pros available, Certified Refurbished, starting at $2119 and ranging up to $600 off MSRP. Each model features a new outer case, shipping is free... Read more
Apple HomePods on sale for $30-$50 off MSRP t...
Best Buy is offering a $30-$50 discount on Apple HomePods this weekend on their online store. The HomePod mini is on sale for $69.99, $30 off MSRP, while Best Buy has the full-size HomePod on sale... Read more
Limited-time sale: 13-inch M3 MacBook Airs fo...
Amazon has the base 13″ M3 MacBook Air (8GB/256GB) in stock and on sale for a limited time for $989 shipped. That’s $110 off MSRP, and it’s the lowest price we’ve seen so far for an M3-powered... Read more
13-inch M2 MacBook Airs in stock today at App...
Apple has 13″ M2 MacBook Airs available for only $849 today in their Certified Refurbished store. These are the cheapest M2-powered MacBooks for sale at Apple. Apple’s one-year warranty is included,... Read more

Jobs Board

Licensed Practical Nurse - Womens Imaging *A...
Licensed Practical Nurse - Womens Imaging Apple Hill - PRN Location: York Hospital, York, PA Schedule: PRN/Per Diem Sign-On Bonus Eligible Remote/Hybrid Regular Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
Operating Room Assistant - *Apple* Hill Sur...
Operating Room Assistant - Apple Hill Surgical Center - Day Location: WellSpan Health, York, PA Schedule: Full Time Sign-On Bonus Eligible Remote/Hybrid Regular Read more
Solutions Engineer - *Apple* - SHI (United...
**Job Summary** An Apple Solution Engineer's primary role is tosupport SHI customers in their efforts to select, deploy, and manage Apple operating systems and Read more
DMR Technician - *Apple* /iOS Systems - Haml...
…relevant point-of-need technology self-help aids are available as appropriate. ** Apple Systems Administration** **:** Develops solutions for supporting, deploying, Read more
All contents are Copyright 1984-2011 by Xplain Corporation. All rights reserved. Theme designed by Icreon.