home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / csmpdigest / csmp-digest-v3-019 < prev    next >
Text File  |  2010-09-21  |  88KB  |  2,289 lines

  1. Received-Date: Mon, 25 Apr 1994 11:12:00 +0200
  2. From: pottier@clipper.ens.fr (Francois Pottier)
  3. Subject: csmp-digest-v3-019
  4. To: csmp-digest@ens.fr
  5. Date: Mon, 25 Apr 94 11:11:52 MET DST
  6. X-Mailer: ELM [version 2.3 PL11]
  7. Errors-To: listman@ens.fr
  8. Reply-To: pottier@clipper.ens.fr
  9. X-Sequence: 21
  10.  
  11. C.S.M.P. Digest             Mon, 25 Apr 94       Volume 3 : Issue 19
  12.  
  13. Today's Topics:
  14.  
  15.         C Source Code Wanted: Beginer Examples
  16.         Decompressing JPEG images: Help!
  17.         Mac Game Programming
  18.         Mixed Mode Manager statistics gathering - is it possible?
  19.         Pure virtual call from a dtor
  20.         Symantec C++ 7.0 (Full)- Initial Impressions
  21.         Symantec technical support not home
  22.         System 7 Pro & Drag Mgr.
  23.         Using PBCatSearch
  24.  
  25.  
  26.  
  27. The Comp.Sys.Mac.Programmer Digest is moderated by Francois Pottier
  28. (pottier@clipper.ens.fr).
  29.  
  30. The digest is a collection of article threads from the internet newsgroup
  31. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  32. regularly and want an archive of the discussions.  If you don't know what a
  33. newsgroup is, you probably don't have access to it.  Ask your systems
  34. administrator(s) for details.  If you don't have access to news, you may
  35. still be able to post messages to the group by using a mail server like
  36. anon.penet.fi (mail help@anon.penet.fi for more information).
  37.  
  38. Each issue of the digest contains one or more sets of articles (called
  39. threads), with each set corresponding to a 'discussion' of a particular
  40. subject.  The articles are not edited; all articles included in this digest
  41. are in their original posted form (as received by our news server at
  42. nef.ens.fr).  Article threads are not added to the digest until the last
  43. article added to the thread is at least two weeks old (this is to ensure that
  44. the thread is dead before adding it to the digest).  Article threads that
  45. consist of only one message are generally not included in the digest.
  46.  
  47. The digest is officially distributed by two means, by email and ftp.
  48.  
  49. If you want to receive the digest by mail, send email to listserv@ens.fr
  50. with no subject and one of the following commands as body:
  51.     help                        Sends you a summary of commands
  52.     subscribe csmp-digest Your Name    Adds you to the mailing list
  53.     signoff csmp-digest            Removes you from the list
  54. Once you have subscribed, you will automatically receive each new
  55. issue as it is created.
  56.  
  57. The official ftp info is //ftp.dartmouth.edu/pub/csmp-digest.
  58. Questions related to the ftp site should be directed to
  59. scott.silver@dartmouth.edu. Currently no previous volumes of the CSMP
  60. digest are available there.
  61.  
  62. Also, the digests are available to WAIS users as comp.sys.mac.programmer.src.
  63.  
  64.  
  65. -------------------------------------------------------
  66.  
  67. >From Spiegs <spie0024@student.tc.umn.edu>
  68. Subject: C Source Code Wanted: Beginer Examples
  69. Date: Fri, 1 Apr 1994 08:15:19 GMT
  70. Organization: University of Minnesota, Twin Cities
  71.  
  72. I am a fairly novice C programmer. I am interested in obtaining all the C
  73. source code I can obtain, preferably simple code for now.
  74.  
  75. I am looking for any FTP sites with C source code available to anonymous
  76. users. Thanks.
  77.  
  78. BTW - I would spring for CodeWarrior in a hartbeat, if I had a CD-Rom.
  79.  
  80. Spiegs
  81. spie0024@gold.tc.umn.edu
  82.  
  83. +++++++++++++++++++++++++++
  84.  
  85. >From kenlong@netcom.com (Ken Long)
  86. Date: Fri, 1 Apr 1994 21:04:02 GMT
  87. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  88.  
  89. Find the current MacFTP list and then connect to ftps on the list which 
  90. reportedly have lots of Mac files.  Stanford and the University of 
  91. Michigan have the "largest stock" of source code.  Look in their 
  92. development and source directories and there are enough examples to 
  93. either make you crave more or give up programming.
  94.  
  95. Check the ftp that's home to the alt.sources.mac newsgroup, as well.
  96.  
  97. -Ken-
  98.  
  99. +++++++++++++++++++++++++++
  100.  
  101. >From chuck@gte.com (Chuck Hoffman)
  102. Date: Tue, 5 Apr 1994 12:43:49 GMT
  103. Organization: GTE Laboratories
  104.  
  105. In article <CnKMty.Eq2@news.cis.umn.edu>, Spiegs
  106. <spie0024@student.tc.umn.edu> wrote:
  107.  
  108. > I am a fairly novice C programmer. I am interested in obtaining all the C
  109. > source code I can obtain, preferably simple code for now.
  110. > I am looking for any FTP sites with C source code available to anonymous
  111. > users. Thanks.
  112.  
  113. 1.  There are good examples for beginners in "Macintosh C Programming
  114. Primer, Volume 1, second edition" by Mark and Reed.  The book comes with a
  115. diskette.
  116.  
  117. 2.  There are several locations for Frequently Asked Questions (FAQs). 
  118. Some of the FAQs include code snippets.  You may be interested in these:
  119.  
  120.    ftp site:  rtfm.mit.edu
  121.    directory:  /pub/usenet/news.answers/macintosh
  122.    files (in order):
  123.    1.  general
  124.    2.  system
  125.    3.  misc
  126.    4.  apps
  127.  
  128.    ftp site:  ftp.cs.uoregon.edu
  129.    directory:  /pub/mac
  130.    files (in order):
  131.    1.  csmp-faq-1
  132.    2.  csmp-faq-2
  133.  
  134.    ftp site:  nada.kth.se
  135.    directory:  /pub/hacks/mac-faq
  136.    file:  CSMP_PD_FAQ
  137.  
  138.    ftp site:  soda.berkeley.edu
  139.    directory:  /pub/jwang
  140.    file:  av-general-faq.txt
  141.  
  142.  
  143. 3.  Chassis is a sample application shell upon which you can build other
  144. applications.  Chassis is a good source of sample code.  Chassis is in the
  145. following anonymous ftp locations.  Do not use the version at Stanford
  146. University (sumex-aim) because it is not current, and is not 32-bit clean. 
  147. Use these, instead:
  148.  
  149. ftp.gte.com:
  150. /pub/chuck/Chassis_6.0.sea.hqx
  151.  
  152. mac.archive.umich.edu:
  153. /mac/development/source/chassis6.0.cpt.hqx
  154.  
  155. -- 
  156. Chuck Hoffman
  157. GTE Laboratories, Waltham, MA, USA
  158. 617-466-2131
  159. - ------------------------------------------------
  160. I'm not sure why we're here, but I am sure that
  161. while we're here we're supposed to help each other.
  162. - ------------------------------------------------
  163.  
  164. +++++++++++++++++++++++++++
  165.  
  166. >From blob@apple.com (Brian Bechtel)
  167. Date: 9 Apr 1994 06:16:48 -0700
  168. Organization: Apple Computer, Inc., Cupertino, California
  169.  
  170. Spiegs <spie0024@student.tc.umn.edu> writes:
  171.  
  172. >I am a fairly novice C programmer. I am interested in obtaining all the C
  173. >source code I can obtain, preferably simple code for now.
  174.  
  175. I have an html file (for Mosaic) on ftp.apple.com which points to
  176. several major source code sites.  ftp.apple.com is not a MacHttp server,
  177. so you have to grab the file directly.  The URL is
  178.  file://ftp.apple.com/pub/blob/macsourcecode.html
  179. I'd welcome additions or corrections.
  180.  
  181. Yes, I do plan to eventually have a HTTP server.
  182.  
  183. --Brian Bechtel     blob@apple.com     "My opinion, not Apple's"
  184.  
  185. ---------------------------
  186.  
  187. >From cr@cs.strath.ac.uk (Chris Reid)
  188. Subject: Decompressing JPEG images: Help!
  189. Date: Wed, 06 Apr 1994 11:22:36 +0000
  190. Organization: University of Strathclyde
  191.  
  192. Hi Netters,
  193.  
  194. I'm trying to decompress and display 32-bit JPEG images. I've (sort of)
  195. figured out how to do this. The problem is, the image doesn't appear
  196. on screen properly, because the palette isn't quite right. At the
  197. same time, I'd like to convert it to PICT format. I'm using QuickTime
  198. to do the 'dirty work' for me. The quality of the decompressed image
  199. should be as high as possible. The destination screen is 8 bits deep.
  200. Here's what I'm doing:
  201.  
  202.  
  203. OpenCPicParams    header;
  204. ImageDescriptionHandle    desc;
  205. PicHandle thePic;
  206.  
  207. [Set up desc and get image dimensions (header.srcRect)]
  208.  
  209. /* Create a gWorld for the decompressed data */
  210. e = NewGWorld(&theGWorld, (*desc)->depth, &header.srcRect, NULL, NULL, 0);
  211.     
  212. if (e != noErr)
  213. {
  214.     [blah, blah]
  215. }
  216.  
  217. /* Set the port and open picture */
  218.  
  219. SetGWorld(theGWorld, NULL);
  220. thePic = OpenCPicture(&header);
  221.     
  222.  
  223. /* Now do the actual decompression */
  224.  
  225. e = FDecompressImage(
  226.         data, 
  227.         desc, 
  228.         GetGWorldPixMap(theGWorld),
  229.         &header.srcRect, 
  230.         NULL, 
  231.         ditherCopy, 
  232.         (RgnHandle) NULL,
  233.         (PixMapHandle) NULL, 
  234.         (Rect *) NULL, 
  235.         codecMaxQuality, 
  236.         bestFidelityCodec, 
  237.         0,
  238.         (DataProcRecordPtr) NULL, 
  239.         (ProgressProcRecordPtr) &myProgressRec);
  240.         
  241. if (e != noErr)
  242. {
  243.     [more blah, blah]
  244. }
  245.  
  246. /* Done! */
  247.  
  248. ClosePicture();
  249.  
  250. /* Now get the (supposedly) ideal 8 bit palette */
  251. /* popularMethod or medianMethod doesn't improve things, btw. */
  252.  
  253. e = GetPixMapInfo(GetGWorldPixMap(theGWorld), &thePictInfo, returnPalette,
  254.                   256, systemMethod, 0);
  255.  
  256. [tidy up etc]
  257.  
  258. /* Display picture and set palette to match */
  259.  
  260. SetPalette(myWindow, thePictInfo.thePalette, TRUE);
  261. DrawPicture(thePic, &(*thePic)->picFrame);
  262.  
  263.  
  264. Everythings works, the picture displays fine. It's just not quite right.
  265. The palette returned doesn't seem to fit the image. GifConverter manages
  266. slightly better, JPEGView displays the image perfectly. What am I doing
  267. wrong?
  268.  
  269. I'll be forever grateful for any hints or solutions! A deadline is looming.
  270. Please e-mail me as our news server is *very* unreliable. I'll summarise
  271. to the net, probably to alt.sources.mac if I can come up with some source
  272. code.
  273.  
  274.  
  275.  
  276. Many thanks in advance,
  277.  
  278.  
  279. Chris
  280.  
  281.  
  282. PS: I can save my converted JPEG image in it's new PICT form. Again,
  283. JPEGView
  284. displays it like a charm. Aaron, how the heck do you do it :-)
  285.  
  286.  
  287. +-----------------------------------------------------------------+
  288. |Chris Reid                            e-mail: cr@cs.strath.ac.uk |
  289. |Dept. Computer Science, Strathclyde University, Glasgow, Scotland|
  290. +-----------------------------------------------------------------+
  291.  
  292. +++++++++++++++++++++++++++
  293.  
  294. >From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  295. Date: 11 Apr 94 17:13:12 +1200
  296. Organization: University of Waikato, Hamilton, New Zealand
  297.  
  298. In article <cr-060494112236@mac-13.cs.strath.ac.uk>, cr@cs.strath.ac.uk (Chris Reid) writes:
  299. >
  300. > I'm trying to decompress and display 32-bit JPEG images. I've (sort of)
  301. > figured out how to do this. The problem is, the image doesn't appear
  302. > on screen properly, because the palette isn't quite right.
  303. >
  304. > /* Now get the (supposedly) ideal 8 bit palette */
  305. > /* popularMethod or medianMethod doesn't improve things, btw. */
  306. >
  307. > e = GetPixMapInfo(GetGWorldPixMap(theGWorld), &thePictInfo, returnPalette,
  308. >                   256, systemMethod, 0);
  309.  
  310. The basic problem is that the Picture Utilities package doesn't understand
  311. anything about QuickTime-compressed PixMaps.
  312.  
  313. It's a pity. They did a good job of integrating QuickTime into all the rest
  314. of QuickDraw, but they never got around to fixing this.
  315.  
  316. You could always decompress to a regular PixMap, do a GetPixMapInfo on this,
  317. then go back and use that palette with the original compressed data.
  318.  
  319. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  320. Info & Tech Services Division              fax: +64-7-838-4066
  321. University of Waikato            electric mail: ldo@waikato.ac.nz
  322. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+12:00
  323.  
  324. ---------------------------
  325.  
  326. >From Shinya Fujimoto <fujimoto+@CMU.EDU>
  327. Subject: Mac Game Programming
  328. Date: Thu,  7 Apr 1994 13:33:28 -0400
  329. Organization: Junior, Electrical and Computer Engineering, Carnegie Mellon, Pittsburgh, PA
  330.  
  331. Hi, 
  332.  
  333. I am not sure if this is the right place to post,
  334. but if I'm wrong, please redirect me.
  335.  
  336. I am a beginner in Macintosh program and am now in
  337. the step of programming a simple game.
  338.  
  339. I wonder if there is any good way to move objects around 
  340. the screen. I currently use scroll, but this becomes
  341. extremely slow if the region is a little too big.
  342. Redrawing the object will flash the object as it erases
  343. and redraws.  
  344.  
  345. Is there any good way??
  346.  
  347. Thanks!
  348.  
  349.     Takoyaki Master
  350.  
  351. - ---------------------------------
  352. Shinya Fujimoto
  353. Carnegie Mellon University
  354.  Carnegie Institue of Technology
  355.  Electrical & Computer Engineering
  356.  
  357. E-mail: sf1x+@andrew.cmu.edu
  358.         fujimoto+@cmu.edu
  359. - ---------------------------------
  360.  
  361. +++++++++++++++++++++++++++
  362.  
  363. >From alex@metcalf.demon.co.uk (Alex Metcalf)
  364. Date: Fri, 8 Apr 1994 10:38:53 GMT
  365. Organization: Demon Internet
  366.  
  367. In article <Mhd4DcG00Vpg0xEWYf@andrew.cmu.edu>, Shinya Fujimoto
  368. <fujimoto+@CMU.EDU> wrote:
  369.  
  370. > Hi, 
  371. > I am not sure if this is the right place to post,
  372. > but if I'm wrong, please redirect me.
  373. > I am a beginner in Macintosh program and am now in
  374. > the step of programming a simple game.
  375. > I wonder if there is any good way to move objects around 
  376. > the screen. I currently use scroll, but this becomes
  377. > extremely slow if the region is a little too big.
  378. > Redrawing the object will flash the object as it erases
  379. > and redraws.  
  380. > Is there any good way??
  381. > Thanks!
  382. >     Takoyaki Master
  383.  
  384.      Don't worry, you're in the right place!
  385.  
  386.      The best way is to keep copying the graphic in the new position.
  387. However, to avoid the flicker, you need to create an "offscreen graphics
  388. world", as described in Inside Mac 6. Just think of it as a screen you
  389. can't see. You draw all the graphics to this world, and then copy them all
  390. onto the screen (in the new positions) using CopyBits, described in Inside
  391. Mac 1 and 5.
  392.  
  393.      Let me know if I can be of more help!
  394.  
  395.      Alex
  396.  
  397. --
  398. Alex Metcalf, Mac programmer in C, C++, HyperTalk, assembler
  399.  
  400. Internet, AOL, BIX: alex@metcalf.demon.co.uk            "Surely you
  401. AppleLink:          alex@metcalf.demon.co.uk@internet#   can't be
  402. CompuServe:         INTERNET:alex@metcalf.demon.co.uk    serious?"
  403. Delphi:             alex@metcalf.demon.co.uk@inet#
  404. FirstClass:         alex@metcalf.demon.co.uk,Internet   "I'm serious...
  405. Fax (UK):           (0570) 45636                         and don't call
  406. Fax (US / Canada):  011 44 570 45636                     me Shirley."
  407.  
  408. +++++++++++++++++++++++++++
  409.  
  410. >From declipse@aol.com (DEclipse)
  411. Date: 7 Apr 1994 17:02:02 -0400
  412. Organization: America Online, Inc. (1-800-827-6364)
  413.  
  414. In article <Mhd4DcG00Vpg0xEWYf@andrew.cmu.edu>, Shinya Fujimoto
  415. <fujimoto+@CMU.EDU> writes:
  416. >I wonder if there is any good way to move objects around 
  417. >the screen. I currently use scroll, but this becomes
  418. >extremely slow if the region is a little too big.
  419. >Redrawing the object will flash the object as it erases
  420. >and redraws.  
  421.  
  422. Well, I don't normally answer posts like this, but since it's for a CMU person
  423. (I grad in '90), here's a start. It works for B & W, but you can change it to
  424. color. Determine the size of the object you want to scroll, add twice the
  425. maximum scroll amount for both horiz. and vert. So:
  426. short H = ObjectH + 2 * DeltaH;
  427. short V = ObjectV + 2 * DeltaV;
  428. Translate H to bits and round to the nearest word:
  429. short RowBytes = ((H +7) / 8 + 1) & 0xFFFE;
  430. in non-optimized code. So you need a block of memory sized V * RowBytes.
  431. Allocate this block and create a BitMap record. Set the fields in the BitMap
  432. and set the base addr to the block of memory you allocated. Create a GrafPort.
  433. SetPortBits to the BitMap. Get the oldPort, SetPort to the GrafPort, Draw your
  434. object in the center of the BitMap, close the port, SetPort to the oldPort. Now
  435. you can use CopyBits from the BitMap you created to qd.screenBits with the
  436. appropriate rects and regions.
  437.  
  438. This is a lot of work, but the fastest compatible method. Keep your mask
  439. regions nil or rects for speed. The white space around the objects is so that
  440. you can erase the old image and copy the new image without having to call
  441. EraseRect. (Calling EraseRect and then CopyBits isn't bad, but there may be
  442. some minor flicker if the Rects overlap.)
  443.  
  444. Howard Fukuda
  445.  
  446. +++++++++++++++++++++++++++
  447.  
  448. >From Reid Ellis <rae@alias.com>
  449. Date: Sun, 10 Apr 1994 01:51:37 GMT
  450. Organization: Alias Research, Inc., Toronto ON Canada
  451.  
  452. Shinya Fujimoto <fujimoto+@CMU.EDU> wrote:
  453. |> I wonder if there is any good way to move objects around 
  454. |> the screen. I currently use scroll, but this becomes
  455. |> extremely slow if the region is a little too big.
  456. |> Redrawing the object will flash the object as it erases
  457. |> and redraws.  
  458.  
  459. Alex Metcalf <alex@metcalf.demon.co.uk> writes:
  460. |     The best way is to keep copying the graphic in the new position.
  461. |However, to avoid the flicker, you need to create an "offscreen graphics
  462. |world", as described in Inside Mac 6.
  463.  
  464. [..more good advice deleted]
  465.  
  466. An alternative is to use the SpriteWorld library, available at an FTP
  467. site near you.  It handles very fast blitting of sprites around the
  468. screen, using offscreen GWorlds and CopyBits() and even non-CopyBits()
  469. [very *compatible* direct-to-screen memory access].
  470.  
  471. I haven't used it myself; these opinions have been formed by reading
  472. feedback in this group over time.
  473.  
  474. Reid
  475. --
  476. - -
  477. Reid Ellis, Alias Research Inc.
  478. +1 416 362 9181 <rae@Alias.com>
  479.  
  480. +++++++++++++++++++++++++++
  481.  
  482. >From alex@metcalf.demon.co.uk (Alex Metcalf)
  483. Date: Sun, 10 Apr 1994 10:34:32 GMT
  484. Organization: Demon Internet
  485.  
  486. In article <1994Apr10.015137.5181@alias.com>, Reid Ellis <rae@alias.com>
  487. wrote:
  488.  
  489. > Shinya Fujimoto <fujimoto+@CMU.EDU> wrote:
  490. > |> I wonder if there is any good way to move objects around 
  491. > |> the screen. I currently use scroll, but this becomes
  492. > |> extremely slow if the region is a little too big.
  493. > |> Redrawing the object will flash the object as it erases
  494. > |> and redraws.  
  495. > Alex Metcalf <alex@metcalf.demon.co.uk> writes:
  496. > |     The best way is to keep copying the graphic in the new position.
  497. > |However, to avoid the flicker, you need to create an "offscreen graphics
  498. > |world", as described in Inside Mac 6.
  499. > [..more good advice deleted]
  500. > An alternative is to use the SpriteWorld library, available at an FTP
  501. > site near you.  It handles very fast blitting of sprites around the
  502. > screen, using offscreen GWorlds and CopyBits() and even non-CopyBits()
  503. > [very *compatible* direct-to-screen memory access].
  504. > I haven't used it myself; these opinions have been formed by reading
  505. > feedback in this group over time.
  506. > Reid
  507.  
  508.         The non-CopyBits direct screen memory access stuff isn't that hard....
  509. the best place to start is to read the "Graphics" folder of the Mac Game
  510. Developer's Handbook on the Developer CDs. It has loads of excellent
  511. technotes relating directly to game development, such as non-CopyBits and
  512. dithering graphics for mono screens.
  513.  
  514.      I could also post some code I've written in assembler: it copies a
  515. rectangle from an offscreen world to either another offscreen world or to
  516. the screen. It works quite well, and beats the hell out of CopyBits.
  517.  
  518.      Alex
  519.  
  520. --
  521. Alex Metcalf, Mac programmer in C, C++, HyperTalk, assembler
  522.  
  523. Internet, AOL, BIX: alex@metcalf.demon.co.uk            "Surely you
  524. AppleLink:          alex@metcalf.demon.co.uk@internet#   can't be
  525. CompuServe:         INTERNET:alex@metcalf.demon.co.uk    serious?"
  526. Delphi:             alex@metcalf.demon.co.uk@inet#
  527. FirstClass:         alex@metcalf.demon.co.uk,Internet   "I am serious...
  528. Fax (UK):           (0570) 45636                         and don't call
  529. Fax (US / Canada):  011 44 570 45636                     me Shirley."
  530.  
  531. ---------------------------
  532.  
  533. >From sbarta@magnus.acs.ohio-state.edu (Scott Barta)
  534. Subject: Mixed Mode Manager statistics gathering - is it possible?
  535. Date: 6 Apr 1994 09:58:08 -0400
  536. Organization: The Ohio State University
  537.  
  538. I have been thinking for a while that a really neat app/init/cdev to write
  539. for the PowerMacs would be one that sits on top of the Mixed Mode Manager
  540. and gathers statistics for the number of mode switches that occur, the
  541. amount of time the system spends emulated, the time spent native, the
  542. overhead for a mode switch, etc.  The utility could collect stats for the
  543. system as a whole and possibly by application.
  544.  
  545. Obviously it would greatly increase the overhead for a mode switch, so it
  546. isn't something one would want running constantly, but it would be very
  547. interesting and informative for those who are curious about what's going on
  548. under the covers.
  549.  
  550. The question is, how could you do it?  I looked at the interface for the
  551. MMM last night, and understandably, there isn't any sort of interface that
  552. would allow you to patch in and install your own routines into a mode
  553. switch.  (I think I can hear the Apple guys groaning somewhere in the
  554. distance).  I tried tracing into some native traps with MacsBug, but,
  555. little to my surprise, a 680X0 debugger didn't give me much help with
  556. native code.
  557.  
  558. But I figure there must be a way, since it sounds like exactly the sort of
  559. thing the Apple engineers would use while developing OS code on the
  560. machine.  Anyone out there care to drop a hint or two (or perhaps bestow a
  561. gift of the utility if it indeed exists)?
  562.  
  563. /************************************************************************/
  564. /* Scott Barta                                                          */
  565. /* Eisenhower National Clearinghouse                                    */
  566. /* The Ohio State University                                            */
  567. /* sbarta@enc.org                                                       */
  568. /************************************************************************/
  569.  
  570.  
  571.  
  572. +++++++++++++++++++++++++++
  573.  
  574. >From jlscott@tigr.org (John L. Scott)
  575. Date: 6 Apr 1994 14:17:43 -0500
  576. Organization: Self
  577.  
  578. In article <199404061358.JAA13146@bottom.magnus.acs.ohio-state.edu>,
  579. sbarta@magnus.acs.ohio-state.edu (Scott Barta) wrote:
  580.  
  581. > Obviously it would greatly increase the overhead for a mode switch, so it
  582. > isn't something one would want running constantly, but it would be very
  583. > interesting and informative for those who are curious about what's going on
  584. > under the covers.
  585.  
  586. Actually, the patch itself would only need to increment a couple of longs
  587. each time a mode switch occurs.  That's not a great increase in overhead.
  588.  
  589. The application that monitors those longs could be set to update them every
  590. second or so.  No great overhead there.
  591.  
  592. Sounds doable to me--if you can figure out what to hook into.
  593.  
  594. --John L. Scott
  595.  
  596. +++++++++++++++++++++++++++
  597.  
  598. >From Brian Strull <strull@apple.com>
  599. Date: Mon, 11 Apr 1994 22:43:27 GMT
  600. Organization: Apple Computer, Inc.
  601.  
  602. The Macintosh Debugger for PowerPC, available with the Macintosh on RISC
  603. SDK,
  604. includes some features for performance gathering.
  605.  
  606. It uses pc sampling to give an estimate of % emulated time vs. % native
  607. time,
  608. and breaks native time up into which libraries you were in, and which
  609. functions within libraries.  Since parts of the system are libraries, this
  610. gives you some of the information you want.
  611.  
  612. This doesn't do everything you asked.  It doesn't count mixed mode
  613. switches,
  614. or measure absolute time spent on mixed mode overhead.
  615.  
  616. +++++++++++++++++++++++++++
  617.  
  618. >From tim@toad.com (Tim Maroney)
  619. Date: 11 Apr 94 20:52:51 GMT
  620. Organization: As Little As Possible
  621.  
  622. In article <199404061358.JAA13146@bottom.magnus.acs.ohio-state.edu>
  623. sbarta@magnus.acs.ohio-state.edu (Scott Barta) writes:
  624. >I have been thinking for a while that a really neat app/init/cdev to write
  625. >for the PowerMacs would be one that sits on top of the Mixed Mode Manager
  626. >and gathers statistics for the number of mode switches that occur, the
  627. >amount of time the system spends emulated, the time spent native, the
  628. >overhead for a mode switch, etc.
  629. >
  630. >The question is, how could you do it?
  631.  
  632. Great idea!  Let's see, is it possible?  Here's a first stab at a design,
  633. for which I make absolutely no promises:
  634.  
  635. (1) Use the millisecond timer for collecting statistics on time spent
  636.     in each mode.  Your timer routine should merely increment a counter
  637.     which will be used by the intercepts below.
  638.  
  639. (2) Detect mode switches from 68K->PPC by intercepting the mixed mode
  640.     pseudo-trap in the 68K emulator.  A little challenging but you should
  641.     be able to use a debugger to find out where the code you need to patch
  642.     lives: just step through an execution of an instance of _MixedModeMagic.
  643.  
  644. (2a) Catching the return to 68K mode is tricky.  You'll need to either
  645.     munge the switch stack frame to return to a routine that does
  646.     the statistics gathering (see IM: PPC System Software, p. 2-11)
  647.     or figure out what the Mixed Mode Manager does when it sees that bit
  648.     and intercept the action another way.  The former is probably easier.
  649.     Your intercept for _MixedModeMagic can push a return address to a 68K
  650.     routine that will notice the mode switch back to 68K and then return
  651.     to the caller of _MixedModeMagic.
  652.  
  653. (3) Detect mode switches from PPC-68K by the method in (2a) as well as by
  654.     patching CallUniversalProc and CallOSTrapUniversalProc.  Again you
  655.     will probably need to push a return-interception code address onto
  656.     the stack.
  657.  
  658. (4) A drop-dead-easy Control Panel interface to turn the thing on and off
  659.     and report the statistics, with an INIT to install these patches.
  660.  
  661. I'd give it about a week, maybe two weeks if the interception of
  662. _MixedModeMagic turns out to be especially tricky.  But I haven't
  663. looked into this in a real way at all, and this design might not work
  664. for that reason.
  665. -- 
  666. Tim Maroney, Communications and User Interface Engineer
  667. {apple!sun}!hoptoad!tim, tim@toad.com
  668.  
  669. "God must be a Boogie Man." -- Joni Mitchell
  670.  
  671. ---------------------------
  672.  
  673. >From rmah@panix.com (Robert S. Mah)
  674. Subject: Pure virtual call from a dtor
  675. Date: Sun, 03 Apr 1994 07:12:50 -0500
  676. Organization: One Step Beyond
  677.  
  678. I have the following code...
  679.  
  680.   class Test{
  681.     public:
  682.       Test() { }
  683.       virtual ~Test();
  684.       virtual int Pure() = 0;
  685.       virtual int Foo();
  686.   };
  687.  
  688.   Test::~Test() { Pure(); }
  689.  
  690.   int Test::Foo() { return Pure(); }
  691.  
  692.  
  693. In Symantec C++ (Mac v7.0) it returns the error...
  694.  
  695.   'Test::Pure' is a pure virtual function
  696.  
  697. in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  698.  
  699. However, Metrowerks C++ compiles the Pure() call in the d'tor without
  700. complaining.
  701.  
  702. Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  703. a pure virtual function from a dtor, but C++ is a strange language...
  704.  
  705. Cheers,
  706. Rob
  707. ________________________________________________________________________
  708.  Robert S. Mah              One Step Beyond              rmah@panix.com
  709.  
  710. +++++++++++++++++++++++++++
  711.  
  712. >From pjl@graceland.att.com (Paul J. Lucas)
  713. Date: Sun, 3 Apr 1994 19:55:48 GMT
  714. Organization: AT&T
  715.  
  716. In <rmah-030494071250@rmah.dialup.access.net> rmah@panix.com (Robert S. Mah) writes:
  717.  
  718. >I have the following code...
  719.  
  720. >  class Test{
  721. >    public:
  722. >      Test() { }
  723. >      virtual ~Test();
  724. >      virtual int Pure() = 0;
  725. >      virtual int Foo();
  726. >  };
  727.  
  728. >  Test::~Test() { Pure(); }
  729.  
  730. >  int Test::Foo() { return Pure(); }
  731.  
  732.  
  733. >In Symantec C++ (Mac v7.0) it returns the error...
  734.  
  735. >  'Test::Pure' is a pure virtual function
  736.  
  737. >in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  738.  
  739. >However, Metrowerks C++ compiles the Pure() call in the d'tor without
  740. >complaining.
  741.  
  742. >Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  743. >a pure virtual function from a dtor, but C++ is a strange language...
  744.  
  745.     The code is legal.  I can find nothing forbidding it in the ARM;
  746.     *con*structors are another matter.
  747. --
  748.     - Paul J. Lucas
  749.       AT&T Bell Laboratories
  750.       Naperville, IL
  751.  
  752. +++++++++++++++++++++++++++
  753.  
  754. >From neeri@iis.ee.ethz.ch (Matthias Neeracher)
  755. Date: 3 Apr 94 23:51:00
  756. Organization: Integrated Systems Laboratory, ETH, Zurich
  757.  
  758. In article <pjl.765402948@graceland.att.com>, pjl@graceland.att.com (Paul J. Lucas) writes:
  759. > In <rmah-030494071250@rmah.dialup.access.net> rmah@panix.com (Robert S. Mah) writes:
  760.  
  761. >>I have the following code...
  762.  
  763. >>  class Test{
  764. >>    public:
  765. >>      Test() { }
  766. >>      virtual ~Test();
  767. >>      virtual int Pure() = 0;
  768. >>      virtual int Foo();
  769. >>  };
  770.  
  771. >>  Test::~Test() { Pure(); }
  772.  
  773. >>  int Test::Foo() { return Pure(); }
  774.  
  775.  
  776. >>In Symantec C++ (Mac v7.0) it returns the error...
  777.  
  778. >>  'Test::Pure' is a pure virtual function
  779.  
  780. >>in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  781.  
  782. >>However, Metrowerks C++ compiles the Pure() call in the d'tor without
  783. >>complaining.
  784.  
  785. >>Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  786. >>a pure virtual function from a dtor, but C++ is a strange language...
  787.  
  788. >     The code is legal.  I can find nothing forbidding it in the ARM;
  789. >     *con*structors are another matter.
  790.  
  791. I think we have different readings of ARM 12.7, pg. 294, then:
  792. # Member functions may be called in constructors and destructors. This implies
  793. # that virtual functions may be called (directly or indirectly). The function
  794. # called will be the one defined in the constructor's (or destructor's) own
  795. # class or its bases, but *not* any function overriding it in a derived class.
  796. # This ensures that unconstructed objects will not be accessed during
  797. # construction or destruction.
  798.  
  799. While the sentence on page 295 talking about pure virtuals only talks about
  800. constructors, it seems clear to me that it applies equally to destructors,
  801. and thus Symantec C++ is IMHO right (as a syntax checker, SC++ definitely
  802. has its merits :-).
  803.  
  804. This behavior makes perfect sense: Once a virtual destructor is called, any
  805. of the "derived objects" have already been destructed and thus their "class
  806. invariants" no longer hold, which makes calling members defined there very
  807. dangerous.
  808.  
  809. Matthias
  810.  
  811. - ---
  812. Matthias Neeracher                                      neeri@iis.ethz.ch
  813.    "Evidently the cleaning lady found him slumped over his Macintosh"
  814.                                -- Jay McInerney, _Brightness Falls_
  815.  
  816.  
  817. +++++++++++++++++++++++++++
  818.  
  819. >From pjl@graceland.att.com (Paul J. Lucas)
  820. Date: Sun, 3 Apr 1994 22:42:41 GMT
  821. Organization: AT&T
  822.  
  823. In <NEERI.94Apr3235100@yggdrasil.ethz.ch> neeri@iis.ee.ethz.ch (Matthias Neeracher) writes:
  824.  
  825. >In article <pjl.765402948@graceland.att.com>, pjl@graceland.att.com (Paul J. Lucas) writes:
  826. >> In <rmah-030494071250@rmah.dialup.access.net> rmah@panix.com (Robert S. Mah) writes:
  827.  
  828. >>>I have the following code...
  829.  
  830. >>>  class Test{
  831. >>>    public:
  832. >>>      Test() { }
  833. >>>      virtual ~Test();
  834. >>>      virtual int Pure() = 0;
  835. >>>      virtual int Foo();
  836. >>>  };
  837.  
  838. >>>  Test::~Test() { Pure(); }
  839.  
  840. >>>  int Test::Foo() { return Pure(); }
  841.  
  842.  
  843. >>>In Symantec C++ (Mac v7.0) it returns the error...
  844.  
  845. >>>  'Test::Pure' is a pure virtual function
  846.  
  847. >>>in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  848.  
  849. >>>However, Metrowerks C++ compiles the Pure() call in the d'tor without
  850. >>>complaining.
  851.  
  852. >>>Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  853. >>>a pure virtual function from a dtor, but C++ is a strange language...
  854.  
  855. >>     The code is legal.  I can find nothing forbidding it in the ARM;
  856. >>     *con*structors are another matter.
  857.  
  858. >I think we have different readings of ARM 12.7, pg. 294, then:
  859. ># Member functions may be called in constructors and destructors. This implies
  860. ># that virtual functions may be called (directly or indirectly). The function
  861. ># called will be the one defined in the constructor's (or destructor's) own
  862. ># class or its bases, but *not* any function overriding it in a derived class.
  863. ># This ensures that unconstructed objects will not be accessed during
  864. ># construction or destruction.
  865.  
  866. >While the sentence on page 295 talking about pure virtuals only talks about
  867. >constructors,
  868.  
  869.     Bingo!
  870.  
  871. >it seems clear to me that it applies equally to destructors,
  872.  
  873.     There is no room for supposition.  It either says it or it doesn't.
  874.     Given that it is not expressly forbidden, it is allowed.
  875.  
  876. >This behavior makes perfect sense: Once a virtual destructor is called, any
  877. >of the "derived objects" have already been destructed and thus their "class
  878. >invariants" no longer hold, which makes calling members defined there very
  879. >dangerous.
  880.  
  881.     While the poster's code has a virtual destructor, that's not the
  882.     issue; the issue is whether a pure virtual *function* can be
  883.     called from a destructor.  Since objects are destroyed bottom
  884.     up, the most-derived function *can* be called it seems.
  885.     Obviously, this is not true for CONstruction since the most
  886.     derived part hasn't been constructed yet.
  887.  
  888.     So perhaps the "omission" in the ARM is intentional.
  889. --
  890.     - Paul J. Lucas
  891.       AT&T Bell Laboratories
  892.       Naperville, IL
  893.  
  894. +++++++++++++++++++++++++++
  895.  
  896. >From b91926@fsgt01.fnal.gov (David Sachs)
  897. Date: 3 Apr 1994 17:52:56 -0500
  898. Organization: FERMILAB, Batavia, IL
  899.  
  900. It is perfectly legal (from the compiler's point of view) to call
  901. a function, that has been declared as pure virtual, either by
  902. calling the function directly or indirectly from a constructor
  903. or destructor, or by calling the function with an explicit scope
  904. qualifier.
  905.  
  906. The C++ language permits explicitly defining a function that has
  907. been declared as pure virtual, specifically for the purpose of
  908. supporting such calls.
  909.  
  910. If a pure virtual function, which has NOT been defined, is called,
  911. the effects at run time are unspecified. Two common methods used
  912. by various C++ implementations are:
  913.  
  914.   Execute random garbage or generate an immidiate failure by
  915.   jumping to location 0.
  916.  
  917.   Execute a function that prints a message about the improper
  918.   call and ends the program.
  919.  
  920. +++++++++++++++++++++++++++
  921.  
  922. >From bobzim@interaccess.com (Bob Zimmerman)
  923. Date: 3 Apr 1994 15:46:20 GMT
  924. Organization: InterAccess, Chicagoland's Full Service Internet Provider
  925.  
  926. Robert S. Mah (rmah@panix.com) wrote:
  927. > I have the following code...
  928.  
  929. >   class Test{
  930. >     public:
  931. >       Test() { }
  932. >       virtual ~Test();
  933. >       virtual int Pure() = 0;
  934. >       virtual int Foo();
  935. >   };
  936.  
  937. >   Test::~Test() { Pure(); }
  938. > In Symantec C++ (Mac v7.0) it returns the error...
  939. >   'Test::Pure' is a pure virtual function
  940. > in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  941. > Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  942. > a pure virtual function from a dtor, but C++ is a strange language...
  943.  
  944. One reason the compiler could be complaining is: A Destructor will call 
  945. all of the "sub-classes" destructors... and the compiler is concerned 
  946. that these destructors... will have "thrown away" information needed by 
  947. the pure virtual funciton... This (IMHO) isn't valid for the compiler to 
  948. enforce in a d'tor since the order of execution is that the current d'tor 
  949. runs first (destroying local stack stuff - as opposed to a sub-classs) so 
  950. the sub-class stuff should always be available.
  951.  
  952. I know in the constructor - this is definilty true... I am not sure why 
  953. it would be enforced for the d'tor...
  954.  
  955. --
  956. - -------------------------------------------------
  957. | Bob Zimmerman   bobzim@interaccess.com          |
  958. |        Voice:   (708) 402-4664                  |
  959. |                                                 |
  960. | If it's worth reading,                          |
  961. |             you found it on Internet!           |
  962. - -------------------------------------------------
  963.  
  964. +++++++++++++++++++++++++++
  965.  
  966. >From rmartin@rcmcon.com (Robert Martin)
  967. Date: Mon, 4 Apr 1994 15:28:47 GMT
  968. Organization: R. C. M. Consulting Inc. 708-918-1004
  969.  
  970. rmah@panix.com (Robert S. Mah) writes:
  971. >  class Test{
  972. >    public:
  973. >      virtual ~Test();
  974. >      virtual int Pure() = 0;
  975. >  };
  976.  
  977. >  Test::~Test() { Pure(); }
  978.  
  979. >Is this legal C++ code?
  980.  
  981. No.  It is illegal to call a pure virtual function from either a
  982. constructor or destructor.  The reason is simple.  When constructing a
  983. derived class, the base class constructor is called first.  While it
  984. is executing the object under construction is an instance of the
  985. "base" NOT an instance of the derived (in fact the vtbl pointer is set
  986. at the vtbl for the base class).  Thus there IS NO IMPLEMENTATION for
  987. the pure function.  
  988.  
  989. C++ has a rule.  No member function will ever be called unless all the
  990. bases and members for that class have been constructed first.  If a
  991. constructor could call and deploy a virtual function to a class lower
  992. in the hierarchy than the currently executing constructor, then this
  993. rule would be violated.
  994.  
  995. Moral:  Don't call pure virtual functions from constructors or
  996. destructors.  Period.
  997.  
  998. -- 
  999. Robert Martin       | Design Consulting   | Training courses offered:
  1000. Object Mentor Assoc.| rmartin@rcmcon.com  |   Object Oriented Analysis
  1001. 2080 Cranbrook Rd.  | Tel: (708) 918-1004 |   Object Oriented Design
  1002. Green Oaks IL 60048 | Fax: (708) 918-1023 |   C++
  1003.  
  1004. +++++++++++++++++++++++++++
  1005.  
  1006. >From neeri@iis.ee.ethz.ch (Matthias Neeracher)
  1007. Date: 5 Apr 94 16:49:40
  1008. Organization: Integrated Systems Laboratory, ETH, Zurich
  1009.  
  1010. In article <pjl.765412961@graceland.att.com>, pjl@graceland.att.com (Paul J. Lucas) writes:
  1011.  
  1012. > In <NEERI.94Apr3235100@yggdrasil.ethz.ch> neeri@iis.ee.ethz.ch (Matthias Neeracher) writes:
  1013.  
  1014. >>In article <pjl.765402948@graceland.att.com>, pjl@graceland.att.com (Paul J. Lucas) writes:
  1015. >>> In <rmah-030494071250@rmah.dialup.access.net> rmah@panix.com (Robert S. Mah) writes:
  1016.  
  1017. >>>>Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  1018. >>>>a pure virtual function from a dtor, but C++ is a strange language...
  1019.  
  1020. >>>     The code is legal.  I can find nothing forbidding it in the ARM;
  1021. >>>     *con*structors are another matter.
  1022.  
  1023. >>I think we have different readings of ARM 12.7, pg. 294, then:
  1024. >># Member functions may be called in constructors and destructors. This implies
  1025. >># that virtual functions may be called (directly or indirectly). The function
  1026. >># called will be the one defined in the constructor's (or destructor's) own
  1027. >># class or its bases, but *not* any function overriding it in a derived class.
  1028. >># This ensures that unconstructed objects will not be accessed during
  1029. >># construction or destruction.
  1030. [...]
  1031. >>This behavior makes perfect sense: Once a virtual destructor is called, any
  1032. >>of the "derived objects" have already been destructed and thus their "class
  1033. >>invariants" no longer hold, which makes calling members defined there very
  1034. >>dangerous.
  1035.  
  1036. >     While the poster's code has a virtual destructor, that's not the
  1037. >     issue; the issue is whether a pure virtual *function* can be
  1038. >     called from a destructor.  Since objects are destroyed bottom
  1039. >     up, the most-derived function *can* be called it seems.
  1040.  
  1041. I'm not sure what you mean by "bottom up". The destructor calling order is
  1042. exactly the opposite of the constructor calling order, so at the time the
  1043. virtual destructor is called, the most-derived function definitely *cannot* be
  1044. called. Look again at the ARM quote above:
  1045.  
  1046. # The function called will be the one defined in the constructor's (or
  1047. # destructor's) own class [...] but *not* any function overriding it [...]
  1048.  
  1049. >     Obviously, this is not true for CONstruction since the most
  1050. >     derived part hasn't been constructed yet.
  1051.  
  1052. And because at DEstruction time, the derived part is not constructed *anymore*,
  1053. the same argument applies there.
  1054.  
  1055. >     So perhaps the "omission" in the ARM is intentional.
  1056.  
  1057. Since we are arguing about the ARM rather than the Old Testament here, I am
  1058. more inclined to consider this an unintentional imprecision. No matter what is
  1059. and is not mentioned on page 295, the language quoted above from page 294 makes
  1060. it clear that a call from the destructor could only call the pure virtual,
  1061. and that is undefined even if page 295 doesn't explicitly say so.
  1062.  
  1063. Matthias
  1064.  
  1065. - ---
  1066. Matthias Neeracher                                      neeri@iis.ee.ethz.ch
  1067.   "Johannes Scotus Eriugena, the greatest European philosopher of the 9th
  1068.    century, said that if reason and authority conflict, reason should be
  1069.    given preference. And if that doesn't sound reasonable to you, you'll
  1070.    just have to accept it..."
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078. +++++++++++++++++++++++++++
  1079.  
  1080. >From rmartin@rcmcon.com (Robert Martin)
  1081. Date: Tue, 5 Apr 1994 14:00:07 GMT
  1082. Organization: R. C. M. Consulting Inc. 708-918-1004
  1083.  
  1084. pjl@graceland.att.com (Paul J. Lucas) writes:
  1085.  
  1086. [regarding the calling of pure virtual functions from destructors...]
  1087. >    There is no room for supposition.  It either says it or it doesn't.
  1088. >    Given that it is not expressly forbidden, it is allowed.
  1089.  
  1090. Bah.  This is a fine example of legalism clouding rational thought.  
  1091.  
  1092. >    [...]the issue is whether a pure virtual *function* can be
  1093. >    called from a destructor.  Since objects are destroyed bottom
  1094. >    up, the most-derived function *can* be called it seems.
  1095. >    Obviously, this is not true for CONstruction since the most
  1096. >    derived part hasn't been constructed yet.
  1097.  
  1098. >    So perhaps the "omission" in the ARM is intentional.
  1099.  
  1100. No.  The "most-derived" function is unimplemented when a PVF is called
  1101. from its own destructor.  The concrete object being destroyed has
  1102. already be partially destructed.  The class that provided the
  1103. implementation for the PVF no longer exists.  
  1104.  
  1105. While it is true that the ARM does not explicitly disallow calling
  1106. PVFs from destructors, I think it is clear that this is an omission,
  1107. and not intended to imply that calling PVFs from destructors is either
  1108. legal or advisable. 
  1109.  
  1110. There is a "hint" in the ARM regarding this.  Section 12.1, in the
  1111. commentary, "...virtual functions will work only after construction
  1112. and before destruction of an object..."  
  1113.  
  1114. The bottom line, in any case, is that if you call a PVF from a
  1115. destructor, your program will crash.  That, I think, is the most
  1116. powerful indictment of all.
  1117.  
  1118. -- 
  1119. Robert Martin       | Design Consulting   | Training courses offered:
  1120. Object Mentor Assoc.| rmartin@rcmcon.com  |   Object Oriented Analysis
  1121. 2080 Cranbrook Rd.  | Tel: (708) 918-1004 |   Object Oriented Design
  1122. Green Oaks IL 60048 | Fax: (708) 918-1023 |   C++
  1123.  
  1124. +++++++++++++++++++++++++++
  1125.  
  1126. >From kanze@us-es.sel.de (James Kanze)
  1127. Date: 05 Apr 1994 19:30:55 GMT
  1128. Organization: SEL
  1129.  
  1130. In article <pjl.765412961@graceland.att.com> pjl@graceland.att.com
  1131. (Paul J. Lucas) writes:
  1132.  
  1133. |> In <NEERI.94Apr3235100@yggdrasil.ethz.ch> neeri@iis.ee.ethz.ch (Matthias Neeracher) writes:
  1134.  
  1135. |> >In article <pjl.765402948@graceland.att.com>, pjl@graceland.att.com (Paul J. Lucas) writes:
  1136. |> >> In <rmah-030494071250@rmah.dialup.access.net> rmah@panix.com (Robert S. Mah) writes:
  1137.  
  1138. |> >>>I have the following code...
  1139.  
  1140. |> >>>  class Test{
  1141. |> >>>    public:
  1142. |> >>>      Test() { }
  1143. |> >>>      virtual ~Test();
  1144. |> >>>      virtual int Pure() = 0;
  1145. |> >>>      virtual int Foo();
  1146. |> >>>  };
  1147.  
  1148. |> >>>  Test::~Test() { Pure(); }
  1149.  
  1150. |> >>>  int Test::Foo() { return Pure(); }
  1151.  
  1152.  
  1153. |> >>>In Symantec C++ (Mac v7.0) it returns the error...
  1154.  
  1155. |> >>>  'Test::Pure' is a pure virtual function
  1156.  
  1157. |> >>>in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  1158.  
  1159. |> >>>However, Metrowerks C++ compiles the Pure() call in the d'tor without
  1160. |> >>>complaining.
  1161.  
  1162. |> >>>Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  1163. |> >>>a pure virtual function from a dtor, but C++ is a strange language...
  1164.  
  1165. |> >>     The code is legal.  I can find nothing forbidding it in the ARM;
  1166. |> >>     *con*structors are another matter.
  1167.  
  1168. |> >I think we have different readings of ARM 12.7, pg. 294, then:
  1169. |> ># Member functions may be called in constructors and destructors. This implies
  1170. |> ># that virtual functions may be called (directly or indirectly). The function
  1171. |> ># called will be the one defined in the constructor's (or destructor's) own
  1172. |> ># class or its bases, but *not* any function overriding it in a derived class.
  1173. |> ># This ensures that unconstructed objects will not be accessed during
  1174. |> ># construction or destruction.
  1175.  
  1176. |> >While the sentence on page 295 talking about pure virtuals only talks about
  1177. |> >constructors,
  1178.  
  1179. |>     Bingo!
  1180.  
  1181. |> >it seems clear to me that it applies equally to destructors,
  1182.  
  1183. |>     There is no room for supposition.  It either says it or it doesn't.
  1184. |>     Given that it is not expressly forbidden, it is allowed.
  1185.  
  1186. |> >This behavior makes perfect sense: Once a virtual destructor is called, any
  1187. |> >of the "derived objects" have already been destructed and thus their "class
  1188. |> >invariants" no longer hold, which makes calling members defined there very
  1189. |> >dangerous.
  1190.  
  1191. |>     While the poster's code has a virtual destructor, that's not the
  1192. |>     issue; the issue is whether a pure virtual *function* can be
  1193. |>     called from a destructor.  Since objects are destroyed bottom
  1194. |>     up, the most-derived function *can* be called it seems.
  1195. |>     Obviously, this is not true for CONstruction since the most
  1196. |>     derived part hasn't been constructed yet.
  1197.  
  1198. Since when are objects destroyed bottom up?  The most derived class is
  1199. destructed first, then the next, and the base class is destructed
  1200. last.  (Destruction is in the opposite order of construction.)
  1201.  
  1202. In particular, when executing the destructor for a class, all derived
  1203. classes have already been destructed.
  1204.  
  1205. |>     So perhaps the "omission" in the ARM is intentional.
  1206.  
  1207. I don't think so.
  1208. --
  1209. James Kanze                       email: kanze@lts.sel.alcatel.de
  1210. GABI Software, Sarl., 8 rue du Faisan, F-67000 Strasbourg, France
  1211. Conseils en informatique industrielle --
  1212.                    -- Beratung in industrieller Datenverarbeitung
  1213.  
  1214. +++++++++++++++++++++++++++
  1215.  
  1216. >From thor@telerama.lm.com (Tom Moertel)
  1217. Date: 5 Apr 1994 18:59:34 -0400
  1218. Organization: MSA, Inc., CSG Technologies Division
  1219.  
  1220. Robert S. Mah (rmah@panix.com) wrote:
  1221. : I have the following code...
  1222. :
  1223. :   class Test{
  1224. :     public:
  1225. :       Test() { }
  1226. :       virtual ~Test();
  1227. :       virtual int Pure() = 0;
  1228. :       virtual int Foo();
  1229. :   };
  1230. :
  1231. :   Test::~Test() { Pure(); }
  1232. :
  1233. :   int Test::Foo() { return Pure(); }
  1234.  
  1235.  
  1236. : In Symantec C++ (Mac v7.0) it returns the error...
  1237. :   'Test::Pure' is a pure virtual function
  1238. : in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  1239.  
  1240. [Snip]
  1241.  
  1242. : Which is right?  Is this legal C++ code?  I can't imagine why I can't call
  1243. : a pure virtual function from a dtor, but C++ is a strange language...
  1244.  
  1245.  
  1246. Strictly speaking, it's legal, but like calls from constructors, calls
  1247. from destructors do not use virtual lookup to call member functions of
  1248. derived classes.  For example, calling Pure() from Test's destructor
  1249. is equivalent to calling Test::Pure().  When SC++ complains about
  1250. calling a pure virtual function from a destructor, it's actually
  1251. trying to do you a favor.  It reasons that because Pure() is pure
  1252. virtual, Test::Pure() doesn't exist (faulty conclusion), and therefore
  1253. you have made a mistake.
  1254.  
  1255. What's weird is that if you actually define Test::Pure(), which 
  1256. is a perfectly legitimate thing to do, SC++ still gives you the 
  1257. error.  There is a solution, however: just call Test::Pure() 
  1258. explicitly.  Not only does this work, it helps readers of your 
  1259. code better understand what is really happening.
  1260.  
  1261. I've tried this, and it works fine:
  1262.  
  1263. class Test
  1264. {
  1265.     virtual int Pure() = 0;
  1266.     virtual ~Test();
  1267. };
  1268.  
  1269. int Test::Pure() { return 0; }
  1270. Test::~Test() { Test::Pure(); }
  1271.  
  1272. // doesn't compile: Test::~Test() { Pure(); }
  1273.  
  1274. -- 
  1275. Tom Moertel                          Interests:  Software Engineering,
  1276.                                                  Symbolic Mathematics,
  1277. MSA, CSG Technologies Division                   Algorithms,
  1278. thor@telerama.lm.com                             Itchy-Scratchy Theory.
  1279.  
  1280. +++++++++++++++++++++++++++
  1281.  
  1282. >From Reid Ellis <rae@alias.com>
  1283. Date: Sat, 9 Apr 1994 21:17:33 GMT
  1284. Organization: Alias Research, Inc., Toronto ON Canada
  1285.  
  1286. Robert Mah <rmah@panix.com> wrote:
  1287. |I have the following code...
  1288. |
  1289. |  class Test{
  1290. |    public:
  1291. |      Test() { }
  1292. |      virtual ~Test();
  1293. |      virtual int Pure() = 0;
  1294. |      virtual int Foo();
  1295. |  };
  1296. |
  1297. |  Test::~Test() { Pure(); }
  1298. |
  1299. |  int Test::Foo() { return Pure(); }
  1300. |
  1301. |In Symantec C++ (Mac v7.0) it returns the error...
  1302. |  'Test::Pure' is a pure virtual function
  1303. |in the d'tor.  If I use an empty d'tor, it compiles fine like it should.
  1304.  
  1305. In "The C++ Programming Language, 2nd Edition", in section r.12.7 [p
  1306. 582] it talks about constructors [but not destructors] and pure
  1307. virtual methods:
  1308.  
  1309.             The effect of calling a pure virtual function directly or
  1310.             indirectly for the object being constructed from a
  1311.             constructor, except using explicit qualification, is
  1312.             undefined (see section r.10.3).
  1313.  
  1314. In every other case w.r.t. virtual functions, constructors and
  1315. destructors mirror each other, so I would gather that this case is no
  1316. exception.  Seems like Symantec C++ is justified in signalling an
  1317. error.  Other implementations may do other things, since this use is
  1318. explicitly "undefined".  Making it an error keeps you from writing
  1319. non-portable code, IMHO.
  1320.  
  1321. Reid
  1322. --
  1323. - -
  1324. Reid Ellis, Alias Research Inc.
  1325. +1 416 362 9181 <rae@Alias.com>
  1326.  
  1327. ---------------------------
  1328.  
  1329. >From radicallib@aol.com (RadicalLib)
  1330. Subject: Symantec C++ 7.0 (Full)- Initial Impressions
  1331. Date: 8 Apr 1994 16:58:05 -0400
  1332. Organization: America Online, Inc. (1-800-827-6364)
  1333.  
  1334.      I haven't had time to evaluate the new state of the C++ translator, or
  1335. other compile/code-generation issues... But here's some comments for what they
  1336. are worth.
  1337.  
  1338.      The THINK Project Manager hasn't changed much.  The addition of a
  1339. trivially configurable scripts menu being the major, and a welcome, change. 
  1340. One minor change that I think will also be welcomed is a Preferences dialog for
  1341. C++ Warnings... Every warning is now individually toggleable.
  1342.  
  1343.      It is in the additions, (those things only in the $150 upgrade, NOT in the
  1344. free update), that things get interesting...
  1345.  
  1346.      1) THINK Class Library 2.0 - What we've been waiting for:  A true C++
  1347. application framework.  Since this is real C++, the TCL is no longer supported
  1348. by the C compiler... C TCL users will have to stick with 1.1.3.  Some features:
  1349.      -Real constructors and destructors, (the old IClassName methods are still
  1350. there for backwards compatibility).
  1351.      -Multiple inheritance is used in the TCL.
  1352.      -Exceptions are supported via macros, which will smoothly become native
  1353. exception handling when they introduce it in the compiler.
  1354.      -A large subset of the proposed Run-Time Type Identification (RTTI)
  1355. standard is also implemented in macros.  See section 13.5 in The C++
  1356. Programming Language, 2nd Ed. by Stroustrup for an explanation of the
  1357. usefulness of RTTI, if you are unfamiliar with this.
  1358.      -A new feature called Object I/O provides an IOStream-based binary object
  1359. reading/writing mechanism.
  1360.      -A new class called CSaver is built with Object I/O to provide persistence
  1361. for documents, (e.g. window size and position are stored with saved documents
  1362. auto-magically).
  1363.      -Apple Event support is now comprehensive: For example, the new TCL
  1364. starter app, AEStarter, is now scriptable, recordable, has 15 Apple Events
  1365. besides the Required Suite and 13 AE Classes.  A few examples of the new Events
  1366. and classes: move, delete, duplicate, close, application, character, document,
  1367. file and word.  Seems like a pretty nice base-line to me.
  1368.  
  1369.      2) THINK Inspector - Anyone who has already been doing object-oriented
  1370. programming will immediately recognize a new best friend.  What we'd been doing
  1371. already by a lot of dereferencing and typing is now handled in a smooth and
  1372. user-friendly fashion by this application which can be launched from the THINK
  1373. Debugger.
  1374.      Each Inspector window provides three panes: A Class pane, a Data pane and
  1375. a Function pane.
  1376.      -By clicking on "::" in the Class pane you see your global functions.
  1377.      -By double-clicking on a function in the Function pane the debugger Code
  1378. window goes to that function's code.
  1379.      -If you select a class name in the Class pane, the class's methods are
  1380. displayed in the Function window and any current instances are displayed in the
  1381. data window.
  1382.      -Objects displayed in the data window have a triangle... Which, when
  1383. turned down, shows you the name and current value of the object's members.
  1384.      -If one of the object's members is itself an object, it also has a
  1385. triangle.
  1386.      -One or more non-contiguous selections can be made of member data, which
  1387. you can then bump over to the debugger's Data window... Though there is a
  1388. slight bug with this and data members of type double, (it's reported and
  1389. acknowledged by Symantec).
  1390.      -When an object is selected in the Inspector's Data window, you can have
  1391. the Inspector go to the line of code that was responsible for allocating the
  1392. object.  (!)
  1393.      -By doing a "Select All" in the Class pane, ALL current objects will be
  1394. displayed.  Yes, that includes those that aren't pointed to by anything.  (!!)
  1395.      -The Inspector is a user-interface triumph.  There is NO typing at all in
  1396. the Inspector, everything is clicked, using interface elements we already know
  1397. and love.
  1398.  
  1399.      3) Visual Architect- This application provides a resource building
  1400. environment similar to ResEdit/AppMaker with the code generation capabilities I
  1401. am familiar with from AppMaker.  But it's a lot more powerful.  Explicitly
  1402. based on the TCL, it facilitates the derivation of new classes for custom
  1403. interface elements/views.  Basically, if you ObjectThink you'll love this
  1404. application builder.  A couple observations:
  1405.      -It is well integrated with the THINK Project Manager, even going so far
  1406. as to close files that are open in the TPM which it is about to re-generate,
  1407. (Apple Events begin to really pay off!).
  1408.      -Has double-file generation, like AppMaker, so that for each new class
  1409. introduced there are two files generated, one for your custom code, (the
  1410. higher-level file), one with code that is entirely written by the Visual
  1411. Architect, (the lower-level file).
  1412.      -The lower-level files, which in AppMaker are called p-files for the p in
  1413. the filename that denotes them, are denoted with a prepended "x_" by the Visual
  1414. Architect which will undoubtedly lead to them being called the x files, (pun
  1415. surely intended).
  1416.      -Has excellent Balloon Help support.
  1417.      -Has the usual stuff we expect from this sort of thing: a tear-off Tools
  1418. menu, good Alignment support, drawing tools, etc.
  1419.  
  1420.  
  1421.      I've suffered as much as anyone with the buggy C++ 6.0 release.  But all
  1422. in all, this release is well on its way to restoring my faith.  I think the
  1423. Inspector, in particular, will really raise the bar on the sort of help we
  1424. start to expect from our Macintosh development tools.
  1425.  
  1426.     I am
  1427.        Radical Liberation.
  1428.  
  1429. +++++++++++++++++++++++++++
  1430.  
  1431. >From nagle@netcom.com (John Nagle)
  1432. Date: Sun, 10 Apr 1994 05:16:07 GMT
  1433. Organization: NETCOM On-line Communication Services (408 241-9760 guest)
  1434.  
  1435.      What are the new manuals like?
  1436.  
  1437.                     John Nagle
  1438.  
  1439. +++++++++++++++++++++++++++
  1440.  
  1441. >From radicallib@aol.com (RadicalLib)
  1442. Date: 11 Apr 1994 02:55:05 -0400
  1443. Organization: America Online, Inc. (1-800-827-6364)
  1444.  
  1445. In article <nagleCo12Mv.Irs@netcom.com>, nagle@netcom.com (John Nagle) writes:
  1446.  
  1447. >     What are the new manuals like?
  1448.  
  1449. Very big.  And quite improved.  I was going through the tutorials to learn the
  1450. Visual Architect and was having a fairly fun time.  The section to help you
  1451. begin to understand the TCL is much better than before, (I wish it had been
  1452. there when I was trying to get over that initial learning hump).  Otherwise,
  1453. the new manuals are pretty much like the 6.0 manuals... even the same cover
  1454. design.
  1455.  
  1456.  
  1457. ---------------------------
  1458.  
  1459. >From haney@maverick.llnl.gov (Scott W. Haney)
  1460. Subject: Symantec technical support not home
  1461. Date: 29 Mar 94 20:13:55 GMT
  1462. Organization: Magnetic Fusion Energy - LLNL
  1463.  
  1464.   I received a flier from Symantec advertising C++ version 7.0 and had
  1465. some problems parsing the marketing-speak description of the features.
  1466. Foolishly thinking that they'd be happy to help out a long-time
  1467. customer who was thinking about spending $250 on their products (7.0
  1468. upgrade + PPC kit), I thought I call them up to find out more about
  1469. these features. I called there NON-toll-free number and, after
  1470. listening to a long announcement about how they were going to start
  1471. charging me for technical support, I got a person who the phone menu
  1472. said knew about "product information". Unfortunately, the "product
  1473. information" I asked for was too specific so they said I must talk to
  1474. technical support. I asked if they could transfer me and they said they 
  1475. couldn't. OK, I called the number again and listend to the long message
  1476. and chose the technical support option. I stayed on hold for 30 minutes
  1477. (yes you read that right) and never got to talk to a person (although I
  1478. did get to listen to a lot of elevator music and hear the message "your
  1479. phone call is very important to us" about 200 times). I called back customer
  1480. support and calmly explained that I couldn't get through to customer support
  1481. so could I leave a number so they could get back to me. I was informed that
  1482. with the new "fee-for-support" plan, they never did call-backs, even to
  1483. give information to potential customers. I then asked the customer support rep.
  1484. what I should do to get my question answered and she said my only option was
  1485. to talk to technical support. Since I had already, I thought, made a reasonable
  1486. attempt to do this I asked to talk to her supervisor. Unfortunately, he
  1487. was at lunch. I asked if I could leave my number for him to call me back.
  1488. She said he wouldn't call me back and reminded me that they offer a 60 day
  1489. money back guarantee, so why didn't I just buy the product and if it didn't
  1490. have the features I needed I could get a refund. Remaining calm, I said
  1491. that I wouldn't do business with Symantec under these circumstances. She
  1492. said she was sorry to hear that but there was nothing she could do.
  1493.   I've seen Symantec get flamed almost continuously for the past several months
  1494. and, quite frankly, I thought some of it was a bit unfair. However, this
  1495. experience has left me feeling that the company doesn't really care very
  1496. much about keeping customers. In particular, I've never before had a company 
  1497. make me jump through hoops in order to get info about a product.
  1498.   I'm fairly close to deciding not to give Symantec any more of my business.
  1499. However, I'm willing to grant that I hit a bad day in technical support land
  1500. and give Symantec another chance. Therefore, I wonder if someone from Symantec
  1501. could contact me via email to answer a few brief questions about the THINK
  1502. Project Manager.
  1503.  
  1504. Scott
  1505.  
  1506.  
  1507. --
  1508. - -----------------------------------------------------------------------
  1509. Scott W. Haney        || Lawrence Livermore N'Lab || The above views are 
  1510. haney@random.llnl.gov || P.O. Box 808;  L-637     || mine and not neces-
  1511. (510) 423-6308        || Livermore, CA  94550     || sarily LLNL's.
  1512.  
  1513. +++++++++++++++++++++++++++
  1514.  
  1515. >From sbill@informix.com (Bill Stackhouse)
  1516. Date: 29 Mar 1994 23:39:37 GMT
  1517. Organization: Informix Software, Inc.
  1518.  
  1519. In article <haney.764972035@maverick> haney@maverick.llnl.gov (Scott W. Haney) writes:
  1520. >  I received a flier from Symantec advertising C++ version 7.0 and had
  1521. >some problems parsing the marketing-speak description of the features.
  1522. >Foolishly thinking that they'd be happy to help out a long-time
  1523. >customer who was thinking about spending $250 on their products (7.0
  1524. >upgrade + PPC kit), I thought I call them up to find out more about
  1525. >these features. I called there NON-toll-free number and, after
  1526.  
  1527. [bunch of complaints deleted]
  1528.  
  1529. Phil Shapiro is a great resource and always gets a response back to me
  1530. in short order. His email address is phils@bedford.symantec.com  If you
  1531. read the programming group, you know about Phil. You should have tried
  1532. him first since you probably knew that your questions were more
  1533. technical than could be answered by a sales person. Did you do that just
  1534. to have a reason to complain?
  1535.  
  1536. Yes they handled the call very badly and I would have been pissed off.
  1537. If you had had a real technical support question and not a sales question
  1538. I bet you could have gotten it answered.
  1539.  
  1540. If you have been a Think C user, you have a good feel for what any
  1541. version of Think C will look like. The 60 day MBG is a great way to
  1542. test drive the new version if you have some nagging unanswered
  1543. questions.  It sounds like the person handled that part correctly given
  1544. that tech support was not an option and this person did not have an
  1545. answer for you.  May be she/he should have but they did not. They 
  1546. probably get 100's of calls a day and many of them from people that
  1547. probably never planned to buy. They have to make a business decission
  1548. about how to allocate their dollars.
  1549.  
  1550. Faning the flames does not help anyone. If you don't like Symantec
  1551. then you just don't like them. There are many people who still do.
  1552. Except for some C++ bugs, Think C is still a great product.
  1553.  
  1554. Again, give Phil some direct questions and see if that helps.
  1555.  
  1556. Flame me if you want, I will not listen. I am tired of the petty
  1557. complaints over the upgrage fees and what a bad product Think C
  1558. has become. $150/$250 is cheap if you are doing real development 
  1559. and if you are just playing around, then stick with version 6.
  1560. There are some of us that have to have one of each compiler so that 
  1561. the others can have development tools.
  1562.  
  1563. Bill
  1564.  
  1565.  
  1566.  
  1567. +++++++++++++++++++++++++++
  1568.  
  1569. >From mahboud@aggroup.com (mahboud)
  1570. Date: Tue, 29 Mar 1994 16:26:38 -0800
  1571. Organization: AG Group, Inc.
  1572.  
  1573. In article <haney.764972035@maverick>, haney@maverick.llnl.gov (Scott W.
  1574. Haney) wrote:
  1575.  
  1576. >   [description of hellish phone experience]
  1577. > Scott
  1578.  
  1579. Scott, please let us know what you find out.
  1580.  
  1581. I am tempted to go through and print out all the flames and mail them to
  1582. Symantec.  Maybe that'll wake them up.
  1583.  
  1584. I have had similar experience with calling Symantec.  I had a profiler
  1585. problem with THINK C and after being on the phone for quite a long time,
  1586. the person answering couldn't help me (he read me some passages out of the
  1587. manual!) and told me that there is no one there who know much about the
  1588. profiler.
  1589.  
  1590. And they expect us to start paying for this sort of service??  
  1591.  
  1592. -mahboud
  1593. - -------------------------------------------------------------
  1594. Mahboud Zabetian
  1595. mahboud@aggroup.com
  1596. ag group, inc.
  1597. 2540 camino diablo, suite 200
  1598. walnut creek, ca 94596
  1599. 510-937-7900 voice
  1600. 510-937-2479 fax
  1601. 510-937-6704 ara
  1602. ftp.aggroup.com anonymous ftp
  1603.  
  1604. +++++++++++++++++++++++++++
  1605.  
  1606. >From howard@netcom.com (Howard Berkey)
  1607. Date: Wed, 30 Mar 1994 04:57:09 GMT
  1608. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  1609.  
  1610. In article <haney.764972035@maverick> haney@maverick.llnl.gov (Scott W. Haney) writes:
  1611. [unfortunately typical tale of Symantec phone support woe deleted]
  1612.  
  1613. >  I've seen Symantec get flamed almost continuously for the past several months
  1614. >and, quite frankly, I thought some of it was a bit unfair. However, this
  1615. >experience has left me feeling that the company doesn't really care very
  1616. >much about keeping customers. In particular, I've never before had a company 
  1617. >make me jump through hoops in order to get info about a product.
  1618.  
  1619. While your story is pretty ugly, and indeed I'm saddened (but not
  1620. surprised) to hear that Symantec is now charging for tech support on a
  1621. product which (in general) requires it to some extent, all I can say
  1622. is if you think that was bad try dealing with IBM sales sometime.
  1623.  
  1624. At work I had to talk to a salesman for 30 minutes once just trying to
  1625. convince him that I had a RS/6000 when all I wanted to buy was an OS
  1626. upgrade or something similar.  The conversation went something like:
  1627.  
  1628. Sales droid:  "I'm veree sorree, all we show at your site are AS/400
  1629. computers."
  1630.  
  1631. Me:  "Trust me.  I develop on this RS/6000 for a living.  Here's what
  1632. uname -a says.  Here's the serial number. [etc]".
  1633.  
  1634. Sales droid: "Please hold."
  1635.  
  1636. (5 mins later)
  1637.  
  1638. Droid:  "I'm veree sorree..."
  1639.  
  1640. That went on for a half hr. until he got ahold of our regular sales
  1641. rep.  
  1642.  
  1643. So good luck with Symantec... at least they believe you when you call
  1644. :-)
  1645.  
  1646. -H-
  1647.  
  1648.  
  1649.  
  1650.  
  1651. -- 
  1652. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  1653. Howard Berkey                                             howard@netcom.com   
  1654.                             Kill the Wabbit!
  1655.  
  1656. +++++++++++++++++++++++++++
  1657.  
  1658. >From d88-jwa@mumrik.nada.kth.se (Jon Wdtte)
  1659. Date: 30 Mar 1994 07:53:19 GMT
  1660. Organization: The Royal Institute of Technology
  1661.  
  1662. In <haney.764972035@maverick> haney@maverick.llnl.gov (Scott W. Haney) writes:
  1663.  
  1664. >  I'm fairly close to deciding not to give Symantec any more of my business.
  1665. >However, I'm willing to grant that I hit a bad day in technical support land
  1666. >and give Symantec another chance. Therefore, I wonder if someone from Symantec
  1667.  
  1668. Actually, I think you hit the bad product for Symantec.
  1669. Symantec should be selling word processors, mail applications
  1670. and project organization chart drawing programs, not development
  1671. tools. They should separate out development tools into a whole
  1672. subsidiary company, with its OWN support channels, management,
  1673. marketing budget, ...
  1674.  
  1675. That's about the only way they can believably stay at the forefront
  1676. of the tools business.
  1677. -- 
  1678.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  1679.     Not speaking for the Liberian Government.
  1680.  
  1681. +++++++++++++++++++++++++++
  1682.  
  1683. >From d88-jwa@mumrik.nada.kth.se (Jon Wdtte)
  1684. Date: 30 Mar 1994 07:56:09 GMT
  1685. Organization: The Royal Institute of Technology
  1686.  
  1687. In <2nae7p$5bg@infmx.informix.com> sbill@informix.com (Bill Stackhouse) writes:
  1688.  
  1689. >Phil Shapiro is a great resource and always gets a response back to me
  1690. >in short order. His email address is phils@bedford.symantec.com  If you
  1691.  
  1692. >Again, give Phil some direct questions and see if that helps.
  1693.  
  1694. I would say DON'T.
  1695.  
  1696. Phil works on the compiler.
  1697.  
  1698. He has better things to do than answering technical support letters.
  1699.  
  1700. The only time I sent a direct letter was regarding some reproducible
  1701. bug in the compiler which didn't quite make it through the normal tech
  1702. support channels.
  1703.  
  1704. -- 
  1705.  -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  1706.     Not speaking for the Liberian Government.
  1707.  
  1708. +++++++++++++++++++++++++++
  1709.  
  1710. >From haney@maverick.llnl.gov (Scott W. Haney)
  1711. Date: 30 Mar 94 16:42:03 GMT
  1712. Organization: Magnetic Fusion Energy - LLNL
  1713.  
  1714. sbill@informix.com (Bill Stackhouse) writes:
  1715.  
  1716. >In article <haney.764972035@maverick> haney@maverick.llnl.gov (Scott W. Haney) writes:
  1717. >>  I received a flier from Symantec advertising C++ version 7.0 and had
  1718. >>some problems parsing the marketing-speak description of the features.
  1719. >>Foolishly thinking that they'd be happy to help out a long-time
  1720. >>customer who was thinking about spending $250 on their products (7.0
  1721. >>upgrade + PPC kit), I thought I call them up to find out more about
  1722. >>these features. I called there NON-toll-free number and, after
  1723.  
  1724. >[bunch of complaints deleted]
  1725.  
  1726. >Phil Shapiro is a great resource and always gets a response back to me
  1727. >in short order. His email address is phils@bedford.symantec.com  If you
  1728. >read the programming group, you know about Phil. You should have tried
  1729. >him first since you probably knew that your questions were more
  1730. >technical than could be answered by a sales person. Did you do that just
  1731. >to have a reason to complain?
  1732.  
  1733. Bill,
  1734.  
  1735.   I think you misunderstood my message. Let me explain.
  1736.   Over the past few years I *have* sent mail, usually from CompuServe,
  1737. to people at Symantec, including Phil Shapiro. Generally, I did not receive
  1738. a reply. The messages were generally questions or comments, written
  1739. civilly. I don't hold the lack of replies against Symantec, I simply
  1740. determined that this was not a good way to get my questions answered.
  1741. Apparently your experience has been different. Fair enough.
  1742.   Second, I spent 1/2 on hold waiting for TECHNICAL support. Contrary to
  1743. your assertion, they were the correct people to answer my question.
  1744. Furthermore, they have promptly answered this sort of question for me
  1745. in the past.
  1746.   Third, I called Symantec with the inclination to plunk down $250 bucks
  1747. on the 7.0+PPC upgrade. Believe me, I have much better things to do with my 
  1748. time than sit on the phone for an hour listening to music. Symantec would
  1749. have my order now if I could have simply talked to a person who was willing
  1750. to get about 5 minutes of technical questions answered. 
  1751.  
  1752. >Yes they handled the call very badly and I would have been pissed off.
  1753. >If you had had a real technical support question and not a sales question
  1754. >I bet you could have gotten it answered.
  1755.  
  1756. I called the Technical support line three times. When you call Symantec 
  1757. Technical Support you go through a phone menu in order
  1758. to have your call directed. The 1st time I called I chose customer service
  1759. (option 2). I was told they only knew general information. They said to call
  1760. technical support. Fair enough. I then called again and 
  1761. chose technical support (option 4). I then waited 1/2 hour ON HOLD before I 
  1762. hung up. I never talked to a human. My call was not screened. I then called 
  1763. customer service, told them I couldn't get through. I was basically told that
  1764. my only two options were to buy the product or to try technical support again.
  1765. They wouldn't even take my number to call me back when things had calmed down.
  1766. I've been dealing with computer companies for many years and have never
  1767. run into this. Heck, people from Symantec have called me back in the past.
  1768.  
  1769. >If you have been a Think C user, you have a good feel for what any
  1770. >version of Think C will look like. The 60 day MBG is a great way to
  1771. >test drive the new version if you have some nagging unanswered
  1772. >questions.  It sounds like the person handled that part correctly given
  1773. >that tech support was not an option and this person did not have an
  1774. >answer for you.  May be she/he should have but they did not. They 
  1775. >probably get 100's of calls a day and many of them from people that
  1776. >probably never planned to buy. They have to make a business decission
  1777. >about how to allocate their dollars.
  1778.  
  1779. I think you've missed the point. I couldn't talk to people that Symantec
  1780. said would answer my questions. I made, I think, a reasonable attempt to
  1781. do this. Or are you saying I should haved stayed on hold for longer than
  1782. a half hour.
  1783.  
  1784. >Faning the flames does not help anyone. If you don't like Symantec
  1785. >then you just don't like them. There are many people who still do.
  1786. >Except for some C++ bugs, Think C is still a great product.
  1787.  
  1788. Actually, I do like Symantec. I've spent lots of money with them in the
  1789. past and recommended their products to others. I was getting ready to
  1790. spend more money with them. You're clearly misreading my motives. I was
  1791. puzzled by this episode, plus a little pissed off. I can't believe you'd
  1792. feel any different if it happened to you.
  1793.  
  1794. >Again, give Phil some direct questions and see if that helps.
  1795.  
  1796. >Flame me if you want, I will not listen. I am tired of the petty
  1797. >complaints over the upgrage fees and what a bad product Think C
  1798. >has become. $150/$250 is cheap if you are doing real development 
  1799. >and if you are just playing around, then stick with version 6.
  1800. >There are some of us that have to have one of each compiler so that 
  1801. >the others can have development tools.
  1802.  
  1803. I don't intend to flame you. However, I hope you will listen to what I am
  1804. actually saying rather than reading in stuff based on other people's posts.
  1805. For instance, I never complained about the fee. I also explicitly said that
  1806. I may have hit a bad day for technical support and was willing to give
  1807. Symantec the benefit of the doubt. You should have read my message as an
  1808. invitation to Symantec to try to set things right with a long-time customer
  1809. who was, for whatever reason, treated very poorly. Symantec has taken me
  1810. up on this invitation: I just got a mail message Tom Emerson of Symantec
  1811. saying he would answer my questions. 
  1812.  
  1813. Scott
  1814.  
  1815. >Bill
  1816.  
  1817.  
  1818. --
  1819. - -----------------------------------------------------------------------
  1820. Scott W. Haney        || Lawrence Livermore N'Lab || The above views are 
  1821. haney@random.llnl.gov || P.O. Box 808;  L-637     || mine and not neces-
  1822. (510) 423-6308        || Livermore, CA  94550     || sarily LLNL's.
  1823.  
  1824. +++++++++++++++++++++++++++
  1825.  
  1826. >From Chris Russo <chris@sonicsys.com>
  1827. Date: 30 Mar 1994 21:45:50 GMT
  1828. Organization: Sonic Systems, Inc.
  1829.  
  1830. In article <2nae7p$5bg@infmx.informix.com> Bill Stackhouse,
  1831. sbill@informix.com writes:
  1832. >In article <haney.764972035@maverick> haney@maverick.llnl.gov (Scott W.
  1833. Haney) writes:
  1834. >>  I received a flier from Symantec advertising C++ version 7.0 and had
  1835. >>some problems parsing the marketing-speak description of the features.
  1836. >>Foolishly thinking that they'd be happy to help out a long-time
  1837. >>customer who was thinking about spending $250 on their products (7.0
  1838. >>upgrade + PPC kit), I thought I call them up to find out more about
  1839. >>these features. I called there NON-toll-free number and, after
  1840. >
  1841. >[bunch of complaints deleted]
  1842. >
  1843. >Phil Shapiro is a great resource and always gets a response back to me
  1844. >in short order. His email address is phils@bedford.symantec.com  If you
  1845. >read the programming group, you know about Phil. You should have tried
  1846. >him first since you probably knew that your questions were more
  1847. >technical than could be answered by a sales person. Did you do that just
  1848. >to have a reason to complain?
  1849.  
  1850. Bill, I don't think that you're being very fair with Scott.  The internet,
  1851. albeit an awesome resource, should not be a developer's only option when
  1852. confronted with a technical support problem.
  1853.  
  1854. Just as a reality-check, Scott, I had a problem VERY similar to the one
  1855. you had.  I wanted to call Symantec to report a few Source Server bugs and
  1856. to find out when the next revision was due.  After resolving the phone 
  1857. alias that they give you in the manual, I waited on hold for _45_
  1858. minutes!!
  1859. Long distance, no less.  If it were an 800 number, I could maybe
  1860. understand;
  1861. but not even offering some type of callback service was a bit much.
  1862.  
  1863. After I got through to the tech support guy, I received only further
  1864. frustration.  He didn't know anything about ANY of the bugs that I was
  1865. wondering about. "Uh, we haven't encountered that one."  Yeah, right.
  1866. They only happen on several of our machines here with only BASIC use of
  1867. the Source Server stuff.
  1868.  
  1869. >Yes they handled the call very badly and I would have been pissed off.
  1870. >If you had had a real technical support question and not a sales question
  1871. >I bet you could have gotten it answered.
  1872.  
  1873. Well, I can say that I wasn't given any satisfactory answer.  I consider
  1874. my Technonsupport experience with Symantec to have been a total waste of
  1875. my time and my company's money.  I don't plan on going through it again
  1876. in the future.
  1877.  
  1878. >If you have been a Think C user, you have a good feel for what any
  1879. >version of Think C will look like. The 60 day MBG is a great way to
  1880. >test drive the new version if you have some nagging unanswered
  1881. >questions.  It sounds like the person handled that part correctly given
  1882. >that tech support was not an option and this person did not have an
  1883. >answer for you.  May be she/he should have but they did not. They 
  1884. >probably get 100's of calls a day and many of them from people that
  1885. >probably never planned to buy. They have to make a business decission
  1886. >about how to allocate their dollars.
  1887.  
  1888. And WE have to make business decisions about how to handle ours.  I
  1889. wish I would have paid more attention to the net in the first place,
  1890. and I appreciate real life experiences as related by Scott Haney.  They
  1891. help me to make choices.  The only better teacher than experience is
  1892. other peoples' experience.
  1893.  
  1894. >Faning the flames does not help anyone. If you don't like Symantec
  1895. >then you just don't like them. There are many people who still do.
  1896. >Except for some C++ bugs, Think C is still a great product.
  1897.  
  1898. Once again, I appreciate reports like Scott's.  I don't think that he
  1899. was trying to fan any flames.  He was just trying to warn others by
  1900. relating his personal experiences.  There are many people out there
  1901. who value good technical support over other features of a product.
  1902. He might be saving those people a lot of frustration.
  1903.  
  1904. >Again, give Phil some direct questions and see if that helps.
  1905. >
  1906. >Flame me if you want, I will not listen. I am tired of the petty
  1907. >complaints over the upgrage fees and what a bad product Think C
  1908. >has become. $150/$250 is cheap if you are doing real development 
  1909. >and if you are just playing around, then stick with version 6.
  1910. >There are some of us that have to have one of each compiler so that 
  1911. >the others can have development tools.
  1912. >
  1913. >Bill
  1914.  
  1915. I, for one, don't consider his _complaints_ to be petty.
  1916.  
  1917. Chris Russo
  1918.  
  1919. Chris Russo
  1920. Macintosh Software Developer
  1921. Sonic Systems, Inc.                        (408) 736-1900 Ext #107
  1922. Sunnyvale, California, US
  1923.  
  1924. +++++++++++++++++++++++++++
  1925.  
  1926. >From Joe Francis <Joe.Francis@dartmouth.edu>
  1927. Date: 31 Mar 1994 01:28:50 GMT
  1928. Organization: Smooth Roo Software
  1929.  
  1930. Bill Stackhouse, sbill@informix.com writes:
  1931. > Phil Shapiro is a great resource and always gets a response back to me
  1932. > in short order. His email address is phils@bedford.symantec.com  If you
  1933. > read the programming group, you know about Phil. You should have tried
  1934. > him first since you probably knew that your questions were more
  1935. > technical than could be answered by a sales person. 
  1936.  
  1937. I think you need to rent a clue.  When you have technical questions
  1938. about a product, sales and/or tech support are the people in the business
  1939. of answering your questions.  Bugging the product engineers to do, on
  1940. their own time, what the support staff is paid to do, is not the correct
  1941. solution.
  1942.  
  1943. > Did you do that just to have a reason to complain?
  1944.  
  1945. Did you write this just to get flamed?
  1946.  
  1947. - ------------------------------------------------------------------------
  1948. No matter how subtle the wizard, a knife between the shoulder blades
  1949. will seriously cramp his style.
  1950. - ------------------------------------------------------------------------
  1951.  
  1952. +++++++++++++++++++++++++++
  1953.  
  1954. >From amanda@intercon.com (Amanda Walker)
  1955. Date: Wed, 30 Mar 1994 16:02:27 -0500
  1956. Organization: InterCon Systems Corporation, Herndon, VA USA
  1957.  
  1958. sbill@informix.com (Bill Stackhouse) writes:
  1959. > Yes they handled the call very badly and I would have been pissed off. 
  1960. > If you had had a real technical support question and not a sales 
  1961. > question I bet you could have gotten it answered. 
  1962.  
  1963. Rule Number One of Commercial Software: Do not piss off the customers.
  1964. Rule Number Two: See Rule Number One.
  1965.  
  1966. It doesn't matter if he was calling about the color of the box; Symantec 
  1967. should have enough people to answer their phones.  There's more to selling 
  1968. software than making pretty yellow boxes, after all. 
  1969.  
  1970. > $150/$250 is cheap if you are doing real development and if 
  1971. > you are just playing around, then stick with version 6. 
  1972.  
  1973. Or just chuck it and use MPW...
  1974.  
  1975.  
  1976. Amanda Walker
  1977. InterCon Systems Corporation
  1978. -- 
  1979. "Ah, prune juice: a warrior's drink."    -- Star Trek: The Next Generation
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985. +++++++++++++++++++++++++++
  1986.  
  1987. >From philip@cs.wits.ac.za (Philip Machanick)
  1988. Date: Mon, 04 Apr 1994 15:29:40 +0200
  1989. Organization: Computer Science Dept, U of Witwatersrand
  1990.  
  1991. In article <2nbb5f$i0f@news.kth.se>, d88-jwa@mumrik.nada.kth.se (Jon Wtte)
  1992. wrote:
  1993.  
  1994. > Actually, I think you hit the bad product for Symantec.
  1995. > Symantec should be selling word processors, mail applications
  1996. > and project organization chart drawing programs, not development
  1997. > tools. They should separate out development tools into a whole
  1998. > subsidiary company, with its OWN support channels, management,
  1999. > marketing budget, ...
  2000. > That's about the only way they can believably stay at the forefront
  2001. > of the tools business.
  2002.  
  2003. It seems they did do this, only they didn't think to maintain a financial
  2004. interest in the new company - isn't a large chunk of the Metrowerks
  2005. Codewarrior project based on ex-Symantec people?
  2006. -- 
  2007. Philip Machanick                   philip@cs.wits.ac.za
  2008. Department of Computer Science, University of the Witwatersrand
  2009. 2050 Wits, South Africa
  2010. phone 27(11)716-3309  fax 27(11)339-7965
  2011.  
  2012. +++++++++++++++++++++++++++
  2013.  
  2014. >From johnmce@world.std.com (John McEnerney)
  2015. Date: Mon, 4 Apr 1994 19:56:14 GMT
  2016. Organization: The World Public Access UNIX, Brookline, MA
  2017.  
  2018. >It seems they did do this, only they didn't think to maintain a financial
  2019. >interest in the new company - isn't a large chunk of the Metrowerks
  2020. >Codewarrior project based on ex-Symantec people?
  2021.  
  2022. Actually, there are only 3 ex-Symantec employees at Metrowerks, plus Greg 
  2023. Dow who did the TCL on contract for Symantec. Metrowerks itself has quite 
  2024. a few more people than that.
  2025.  
  2026. -- John
  2027.  
  2028.  
  2029. +++++++++++++++++++++++++++
  2030.  
  2031. >From Stuart Cheshire <cheshire@cs.stanford.edu>
  2032. Date: 9 Apr 1994 16:47:29 GMT
  2033. Organization: Stanford University
  2034.  
  2035. In article <Cnr3Dr.CpL@world.std.com> John McEnerney, johnmce@world.std.com
  2036. writes:
  2037. >Actually, there are only 3 ex-Symantec employees at Metrowerks
  2038.  
  2039. Yeah, but WHICH three?
  2040.  
  2041. Stuart Cheshire <cheshire@cs.stanford.edu>
  2042.  * <A HREF="file://brubeck.stanford.edu/www/cheshire-bio.html">WWW</A>
  2043.  * Stanford Distributed Systems Group Research Assistant
  2044.  * Escondido Village Resident Computer Coordinator
  2045.  * Macintosh Programmer
  2046.  
  2047. ---------------------------
  2048.  
  2049. >From interealm@aol.com (Interealm)
  2050. Subject: System 7 Pro & Drag Mgr.
  2051. Date: 2 Apr 1994 11:53:04 -0500
  2052. Organization: America Online, Inc. (1-800-827-6364)
  2053.  
  2054. Hi...
  2055.  
  2056. Can someone tell me what version of the Finder ships with System 7 Pro and
  2057. whether or not Sys7Pro comes stock with built in Drag Manager Support from the
  2058. Finder?
  2059.  
  2060. Thanks in advance...
  2061.  
  2062. Jack
  2063.  
  2064. +++++++++++++++++++++++++++
  2065.  
  2066. >From gdl@stlawrence.maths (Greg Landweber)
  2067. Date: 04 Apr 1994 22:15:41 GMT
  2068. Organization: (none)
  2069.  
  2070. In article <2nk7tg$nvk@search01.news.aol.com> interealm@aol.com (Interealm) writes:
  2071.    Can someone tell me what version of the Finder ships with System 7 Pro and
  2072.    whether or not Sys7Pro comes stock with built in Drag Manager Support from the
  2073.    Finder?
  2074.  
  2075. System 7 Pro uses Finder 7.1.3, which supports the drag manager if the
  2076. Drag Manager is present.
  2077.  
  2078. System 7 Pro contains a limited version of the Drag Manager which is
  2079. used by Finder 7.1.3, but it cannot be used by any other application.
  2080.  
  2081. If you want other applications to support drag manager features, you
  2082. need the "Macintosh Drag and Drop" extension.
  2083.  
  2084. -- Greg "Browser" Landweber
  2085.    gdl@maths.ox.ac.uk
  2086.  
  2087. +++++++++++++++++++++++++++
  2088.  
  2089. >From ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  2090. Date: 5 Apr 94 13:00:13 +1300
  2091. Organization: University of Waikato, Hamilton, New Zealand
  2092.  
  2093. In article <2nk7tg$nvk@search01.news.aol.com>, interealm@aol.com (Interealm) writes:
  2094. >
  2095. > Can someone tell me what version of the Finder ships with System 7 Pro and
  2096. > whether or not Sys7Pro comes stock with built in Drag Manager Support from the
  2097. > Finder?
  2098.  
  2099. System 7 Pro comes with Finder 7.1.3. This is the same version that supports
  2100. the Drag Manager Clipping Extension, Finder scripting, and QuickDraw GX beta 3.
  2101. By the way, the Power Macs come with Finder 7.1.4.
  2102.  
  2103. System 7 Pro has some kind of built-in Drag Manager, but I don't think the
  2104. API for that is available to ordinary mortals--you still need to install the
  2105. Drag Manager extension to get the public API.
  2106.  
  2107. That built-in Drag Manager is interesting: it lets you drag stuff about
  2108. in Finder windows without bringing the Finder to the front--not until you let
  2109. go the mouse button.
  2110.  
  2111. Lawrence
  2112. (trying to think of an excuse for wanting that feature in my own programs :-))
  2113.  
  2114. +++++++++++++++++++++++++++
  2115.  
  2116. >From Jens Alfke <jens_alfke@powertalk.apple.com>
  2117. Date: Thu, 7 Apr 1994 00:51:21 GMT
  2118. Organization: Apple Computer
  2119.  
  2120. Lawrence D'Oliveiro, ldo@waikato.ac.nz writes:
  2121. > That built-in Drag Manager is interesting: it lets you drag stuff about
  2122. > in Finder windows without bringing the Finder to the front--not until you
  2123. let
  2124. > go the mouse button.
  2125. > Lawrence
  2126. > (trying to think of an excuse for wanting that feature in my own programs
  2127. :-))
  2128.  
  2129. This is the preferred HI for draggable apps. You want to be able to drag
  2130. something from a background window without having that window immediately
  2131. come to the front and obscure your intended destination. Finder 7.0 fixed
  2132. this for the Finder->Finder drag situation, and with the Drag Manager they've
  2133. generalized it into an HI guideline for all apps.
  2134.  
  2135. --Jens Alfke
  2136.   jens_alfke@powertalk              Rebel girl, rebel girl,
  2137.             .apple.com              Rebel girl you are the queen of my world
  2138.  
  2139. ---------------------------
  2140.  
  2141. >From mjg001@acad.drake.edu
  2142. Subject: Using PBCatSearch
  2143. Date: Tue, 5 Apr 1994 21:18:19 GMT
  2144. Organization: Drake University, Des Moines, Iowa, USA
  2145.  
  2146. I seem to be having a problem with a difference between the described
  2147. record in IM and what I actually find in the C interface libraries for the
  2148. Mac. Let me explain. I'm trying to access a field in a struct of CInfoPBRec,
  2149. I'm trying to access the ioNamePtr field in the record by using a CInfoPBPtr.
  2150. The problem is that whenever I compile the compiler says that there is no
  2151. such member in that struct. I looked in the C interface libraries for THINK
  2152. C and found that there is no ioNamePtr in the struct CInfoPBRec like
  2153. described in IM. 
  2154.  
  2155. I'm trying to search a disk using PBCatSearch() and this is where I have ended
  2156. up. If you have any code or examples for this in C then please send them
  2157. to me. Thanks for any help.
  2158.  
  2159.  
  2160.                 -Mike
  2161.  
  2162.  
  2163. +++++++++++++++++++++++++++
  2164.  
  2165. >From greer@utdallas.edu (Dale M. Greer)
  2166. Date: 5 Apr 1994 21:39:04 GMT
  2167. Organization: The University of Texas at Dallas
  2168.  
  2169. mjg001@acad.drake.edu wrote:
  2170. > I seem to be having a problem with a difference between the described
  2171. > record in IM and what I actually find in the C interface libraries for the
  2172. > Mac. Let me explain. I'm trying to access a field in a struct of CInfoPBRec,
  2173. > I'm trying to access the ioNamePtr field in the record by using a CInfoPBPtr.
  2174. > The problem is that whenever I compile the compiler says that there is no
  2175. > such member in that struct. I looked in the C interface libraries for THINK
  2176. > C and found that there is no ioNamePtr in the struct CInfoPBRec like
  2177. > described in IM. 
  2178.  
  2179. > I'm trying to search a disk using PBCatSearch() and this is where I have ended
  2180. > up. If you have any code or examples for this in C then please send them
  2181. > to me. Thanks for any help.
  2182.  
  2183. I found an example of using PBCatSearch at ftp.apple.com.  It looks
  2184. for a file by Type and Creator.  Once it finds the file, the name
  2185. is in csBlockPtr->ioMatchPtr[0].name.  Before searching, the field
  2186. csBlockPtr->ioSearchInfo1->hFileInfo.ioNamePtr is set to nil.  The
  2187. structure csBlockPtr is a CSParamPtr.  CInfoPBPtr begins with an
  2188. HFileInfo, which in turn begins with a ParamBlockHeader which
  2189. also contains an ioNamePtr.
  2190.  
  2191. I can send you the DTS PBCatSearch example or post it if you don't have 
  2192. access to ftp.apple.com.
  2193.  
  2194. --
  2195.  
  2196. Dale Greer, greer@utdallas.edu
  2197.  
  2198.  
  2199.  
  2200. +++++++++++++++++++++++++++
  2201.  
  2202. >From allon@intercon.com (Allon Stern)
  2203. Date: Tue,  5 Apr 1994 23:51:31 -0400
  2204. Organization: InterCon Systems Corporation, Herndon VA.
  2205.  
  2206. In article <2nslpo$fga@news.utdallas.edu>, greer@utdallas.edu (Dale M. Greer) 
  2207. writes:
  2208. > mjg001@acad.drake.edu wrote: 
  2209. > > I'm trying to search a disk using PBCatSearch() and this is where I 
  2210. > > have ended up. If you have any code or examples for this in C then 
  2211. > > please send them to me. Thanks for any help. 
  2212. > I found an example of using PBCatSearch at ftp.apple.com.  It looks for 
  2213. > a file by Type and Creator.  Once it finds the file, the name 
  2214. > is in csBlockPtr->ioMatchPtr[0].name.  Before searching, the field 
  2215. > csBlockPtr->ioSearchInfo1->hFileInfo.ioNamePtr is set to nil.  The 
  2216. > structure csBlockPtr is a CSParamPtr.  CInfoPBPtr begins with an 
  2217. > HFileInfo, which in turn begins with a ParamBlockHeader which 
  2218. > also contains an ioNamePtr. 
  2219.  
  2220. When writing your code, keep in mind that not all volumes support PBCatSearch.
  2221. The proper way to check to see if it is supported is to call PBHGetVolParams
  2222. and check the appropriate bit (bHasCatSearch = 7).
  2223.  
  2224. Reference: IM-Files pages 2-147 through 2-150
  2225.  
  2226.  
  2227. Also, on page 2-205 of IM-Files, it states:
  2228. "Not all volumes support the PBCatSearch function [...] even though AFP
  2229. volumes support PBCatSearch, they do not support all of its features that are
  2230. available on local volumes."
  2231.  
  2232. In other words, your mileage may vary 8^)
  2233.  
  2234. --
  2235. Allon
  2236.  
  2237.  
  2238. | Allon Stern        | 703-709-5557 |  Ring around the Internet    |
  2239. | allon@intercon.com |    KE4FYL    |  A packet with a bit not set |
  2240. +--------------------+--------------+  ENQ ACK ENQ ACK             |
  2241. |  All opinions above are my own.   |  We all go down!             |
  2242. |------------------------------------------------------------------|
  2243.  
  2244.  
  2245.  
  2246. +++++++++++++++++++++++++++
  2247.  
  2248. >From blob@apple.com (Brian Bechtel)
  2249. Date: 9 Apr 1994 17:48:49 -0700
  2250. Organization: Apple Computer, Inc., Cupertino, California
  2251.  
  2252. mjg001@acad.drake.edu writes:
  2253.  
  2254. >I'm trying to search a disk using PBCatSearch() and this is where I have ended
  2255. >up. If you have any code or examples for this in C then please send them
  2256. >to me. Thanks for any help.
  2257.  
  2258. ftp://ftp.apple.com/dts/mac/sc/morefiles.1.1.1.hqx
  2259.  
  2260. contains excellent sample code for using PBCatSearch, among other
  2261. functions.
  2262.  
  2263. --Brian Bechtel     blob@apple.com     "My opinion, not Apple's"
  2264.  
  2265. ---------------------------
  2266.  
  2267. End of C.S.M.P. Digest
  2268. **********************
  2269.  
  2270.  
  2271.