home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / Information / CSMP Digest / volume 1 / csmp-v1-209.txt < prev    next >
Encoding:
Text File  |  1994-12-08  |  33.6 KB  |  932 lines  |  [TEXT/R*ch]

  1. C.S.M.P. Digest             Sun, 08 Nov 92       Volume 1 : Issue 209
  2.  
  3. Today's Topics:
  4.  
  5.     What does DrawPicture() want?
  6.     >moving the mouse
  7.     CTB Questions and Answers
  8.     CASE tools
  9.     Changing 'STR#'s
  10.     Vendors for Mac assemblers?  Which are decent?
  11.  
  12.  
  13.  
  14. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  15.  
  16. The digest is a collection of article threads from the internet newsgroup
  17. comp.sys.mac.programmer.  It is designed for people who read c.s.m.p. semi-
  18. regularly and want an archive of the discussions.  If you don't know what a
  19. newsgroup is, you probably don't have access to it.  Ask your systems
  20. administrator(s) for details.  (This means you can't post questions to the
  21. digest.)
  22.  
  23. Each issue of the digest contains one or more sets of articles (called
  24. threads), with each set corresponding to a 'discussion' of a particular
  25. subject.  The articles are not edited; all articles included in this digest
  26. are in their original posted form (as received by our news server at
  27. cs.uoregon.edu).  Article threads are not added to the digest until the last
  28. article added to the thread is at least one month old (this is to ensure that
  29. the thread is dead before adding it to the digest).  Article threads that
  30. consist of only one message are generally not included in the digest.
  31.  
  32. The entire digest is available for anonymous ftp from ftp.cs.uoregon.edu
  33. [128.223.8.8] in the directory /pub/mac/csmp-digest.  Be sure to read the
  34. file /pub/mac/csmp-digest/README before downloading any files.  The most
  35. recent issues are available from sumex-aim.stanford.edu [36.44.0.6] in the
  36. directory /info-mac/digest/csmp.  If you don't have ftp capability, the sumex
  37. archive has a mail server; send a message with the text '$MACarch help' (no
  38. quotes) to LISTSERV@ricevm1.rice.edu for more information.
  39.  
  40. The digest is also available via email.  Just send a note saying that you
  41. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  42. automatically receive each new issue as it is created.  Sorry, back issues
  43. are not available through the mailing list.
  44.  
  45. Send administrative mail to mkelly@cs.uoregon.edu.
  46.  
  47.  
  48. -------------------------------------------------------
  49.  
  50. From: ejw1@kimbark.uchicago.edu (Eric Weidl)
  51. Subject: What does DrawPicture() want?
  52. Organization: Academic and Public Computing
  53. Date: Thu, 24 Sep 1992 20:35:52 GMT
  54.  
  55.  
  56.  
  57. All,
  58.     I'm writing a simple application using the THINK Class Library (1.1.2)
  59. to display PICT files and I'm having a problem with the toolbox DrawPicture() 
  60. routine.  My app opens the file with no problem, I can verify that the 
  61. PicHandle is valid and contains valid data, etc. etc.  When I pass call 
  62. DrawPicture() with the PicHandle, it fails with an out of memory error (-108),
  63. and executes my exception handler.  
  64.     Now, I know that I can increase the application's partition, but the 
  65. problem is deeper than that.  I want to know why DrawPicture fails.  I check 
  66. the amount of free space available using MaxMem() before I call DrawPicture, 
  67. and don't bother if it's not double the size of the PicHandle.  But why 
  68. should DrawPicture need twice as much memory as the PicHandle; it's already 
  69. in memory.  Even with twice the memory it occasionally doesn't draw.  
  70.     I watched the application's heap with Swatch to try to figure out how 
  71. much space DrawPicture was using.  To my surprise, it wasn't using any (at 
  72. least that Swatch knew about.)  If I had 100K free before I called DrawPicture,
  73. I had 100K free afterwards.  So why is DrawPicture choking?
  74.  
  75.     Is there any way to determine how much memory a PICT will need before 
  76. calling DrawPicture?
  77.  
  78. Thanks.
  79.  
  80. - -- 
  81. ===================================================================
  82.                Eric Weidl    e-weidl@uchicago.edu
  83.       University of Chicago -- Academic and Public Computing
  84. ===================================================================
  85.  
  86. +++++++++++++++++++++++++++
  87.  
  88. From: mxmora@unix.SRI.COM (Matt Mora)
  89. Date: 25 Sep 92 16:18:50 GMT
  90. Organization: SRI International, Menlo Park, California
  91.  
  92. In article <1992Sep24.203552.3392@midway.uchicago.edu> ejw1@midway.uchicago.edu writes:
  93.  
  94. >I had 100K free afterwards.  So why is DrawPicture choking?
  95.  
  96.  
  97. Did you lock the picthandle before you called drawpicture? DrawPicture
  98. is a routine that WILL move memory.
  99.  
  100.  
  101. Matt
  102.  
  103. - -- 
  104. ___________________________________________________________
  105. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  106. SRI International           |  my unix  mxmora@unix.sri.com
  107. ___________________________________________________________
  108.  
  109. +++++++++++++++++++++++++++
  110.  
  111. From: lsr@taligent.com (Larry Rosenstein)
  112. Date: 25 Sep 92 23:41:58 GMT
  113. Organization: Taligent, Inc.
  114.  
  115. In article <38871@unix.SRI.COM>, mxmora@unix.SRI.COM (Matt Mora) wrote:
  116. > Did you lock the picthandle before you called drawpicture? DrawPicture
  117. > is a routine that WILL move memory.
  118.  
  119. I didn't think this was necessary.  QuickDraw should lock the handle if it
  120. needs to.
  121.  
  122. In article <1992Sep24.203552.3392@midway.uchicago.edu>,
  123. ejw1@kimbark.uchicago.edu (Eric Weidl) wrote:
  124. > the amount of free space available using MaxMem() before I call DrawPicture, 
  125. > and don't bother if it's not double the size of the PicHandle.  But why 
  126. > should DrawPicture need twice as much memory as the PicHandle; it's already 
  127.  
  128. Images (CopyBits calls) are usually compressed.  QuickDraw might uncompress
  129. the whole thing before doing the actual CopyBits, in which case QuickDraw
  130. could need enough memory to hold the whole image.
  131.  
  132. >     I watched the application's heap with Swatch to try to figure out how 
  133. > much space DrawPicture was using.  To my surprise, it wasn't using any (at 
  134. > least that Swatch knew about.)  If I had 100K free before I called DrawPicture,
  135.  
  136. I'm not sure that Swatch will update its display in the middle of the
  137. DrawPicture.  If the DrawPicture fails, QuickDraw should free everything it
  138. allocated, so the before and after free space should be the same.
  139.  
  140. Larry Rosenstein
  141. Taligent, Inc.
  142.  
  143. lsr@taligent.com
  144.  
  145. +++++++++++++++++++++++++++
  146.  
  147. From: lari@strauss.cs.unc.edu (Humayun Lari)
  148. Date: 26 Sep 92 20:58:31 GMT
  149. Organization: The University of North Carolina at Chapel Hill
  150.  
  151. In article <1992Sep24.203552.3392@midway.uchicago.edu> ejw1@midway.uchicago.edu writes:
  152. [calling DrawPicture causes exception with memFullErr]
  153.  
  154. I ran into a similar problem the other day, while implementing a
  155. CDiskPictFile class that would draw pictures directly from disk.
  156.  
  157. Here's my analysis of what happened -- perhaps your situation is similar:
  158. 1. DrawPicture asks for lots of memory (perhaps it wants to allocate a pixmap
  159.    as large as the picture).
  160. 2. Since there isn't enough memory, the TCL's grow zone function is executed,
  161.    and tries to free memory (e.g. from the rainy day fund) in the hope that
  162.    that will satisfy the request.
  163.  
  164.    That doesn't work. So, the grow zone function checks whether the allocation
  165.    is permitted to fail. Nope -- I haven't called SetAllocation(kAllocCanFail).
  166.    Since an unfulfilled memory request could cause crashes, it raises a
  167.    memFullErr exception.
  168.  
  169. My solution was to enclose the DrawPicture call with calls to SetAllocation.
  170. DrawPicture worked fine; perhaps it uses temporary memory if necessary?
  171. To see if DrawPicture actually managed to draw the picture, I took a look at
  172. QDError and also checked whether the rainy day fund had been depleted.
  173.  
  174. Anyone know of a more elegant way of handling this?
  175.  
  176.  
  177. Humayun Lari
  178. (lari@cs.unc.edu)
  179.  
  180. +++++++++++++++++++++++++++
  181.  
  182. From: stever@netcom.com (Steve Riggins)
  183. Date: 27 Sep 92 16:48:28 GMT
  184. Organization: Netcom - Online Communication Services (408 241-9760 guest)
  185.  
  186. In article <15669@borg.cs.unc.edu> lari@strauss.cs.unc.edu (Humayun Lari) writes:
  187. >In article <1992Sep24.203552.3392@midway.uchicago.edu> ejw1@midway.uchicago.edu writes:
  188. >[calling DrawPicture causes exception with memFullErr]
  189. >
  190. >I ran into a similar problem the other day, while implementing a
  191. >CDiskPictFile class that would draw pictures directly from disk.
  192. >
  193. >Here's my analysis of what happened -- perhaps your situation is similar:
  194. >1. DrawPicture asks for lots of memory (perhaps it wants to allocate a pixmap
  195. >   as large as the picture).
  196. >2. Since there isn't enough memory, the TCL's grow zone function is executed,
  197. >   and tries to free memory (e.g. from the rainy day fund) in the hope that
  198. >   that will satisfy the request.
  199. >
  200. >   That doesn't work. So, the grow zone function checks whether the allocation
  201. >   is permitted to fail. Nope -- I haven't called SetAllocation(kAllocCanFail).
  202. >   Since an unfulfilled memory request could cause crashes, it raises a
  203. >   memFullErr exception.
  204. >
  205.  
  206. What is your stack heap set to?  Is the TCL growing it?  I've had a
  207. lot of problems with CopyBits (which DrawPicture may call) and solved
  208. it
  209. by lowering the AppleLimit and the beginning of execution, prior to my
  210. MaxApplZone call.  By default, a non color QD machine allocates 8K of
  211. RAM to the stack, and on a color QD Mac, you get 32K.  Copybits uses
  212. the
  213. stack, so often, 32K is not enough.  Try an addition 64K.
  214.  
  215. - -- 
  216. Steve Riggins                  Internet: stever@netcom.com
  217. AppleLink:  Voyager.geek       AOL:      RigginsS
  218. CompuServe: 75300,1635         "Can never have enough EMail addresses"
  219.  
  220. +++++++++++++++++++++++++++
  221.  
  222. From: mxmora@unix.SRI.COM (Matt Mora)
  223. Date: 28 Sep 92 16:21:21 GMT
  224. Organization: SRI International, Menlo Park, California
  225.  
  226. In article <lsr-250992163555@lsr.taligent.com> lsr@taligent.com (Larry Rosenstein) writes:
  227. >In article <38871@unix.SRI.COM>, mxmora@unix.SRI.COM (Matt Mora) wrote:
  228. >> 
  229. >> Did you lock the picthandle before you called drawpicture? DrawPicture
  230. >> is a routine that WILL move memory.
  231. >
  232. >I didn't think this was necessary.  QuickDraw should lock the handle if it
  233. >needs to.
  234.  
  235. IM doesn't say that Drawpicture locks the handle. I did an 'ir drawpicture'
  236. in macsbug and didn't see a hlock. (though I'm not sure thats the right
  237. command to use). I seem to remember a program I wrote a long time ago
  238. would crash occasionally. It was drawing a complicated pict as a header
  239. in a window. When I added hlock before the drawpicture calls the random
  240. crashes disappered. I may have locked some other stuff too, its been a while.
  241. Anyway, try locking the picture first then drawpicture. 
  242.  
  243. Matt
  244.  
  245. - -- 
  246. ___________________________________________________________
  247. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  248. SRI International           |  my unix  mxmora@unix.sri.com
  249. ___________________________________________________________
  250.  
  251. +++++++++++++++++++++++++++
  252.  
  253. From: lsr@taligent.com (Larry Rosenstein)
  254. Organization: Taligent, Inc.
  255. Date: Mon, 28 Sep 1992 21:26:37 GMT
  256.  
  257. In article <38962@unix.SRI.COM>, mxmora@unix.SRI.COM (Matt Mora) wrote:
  258. > IM doesn't say that Drawpicture locks the handle. I did an 'ir drawpicture'
  259. > in macsbug and didn't see a hlock. (though I'm not sure thats the right
  260.  
  261. IM also doesn't say that locking the handle is necessary before calling
  262. DrawPicture.  I don't recall reading this in a Tech Note either.
  263.  
  264. DrawPicture itself isn't the thing that accesses picture bytes, since this
  265. can be overridden in a capture proc.  If you disassemble StdGetPict,
  266. however, you see that QuickDraw keeps a handle to the picture and the
  267. offset within the picture in private variables and dereferences the handle
  268. each time it needs to access the picture.
  269.  
  270. > command to use). I seem to remember a program I wrote a long time ago
  271. > would crash occasionally. It was drawing a complicated pict as a header
  272. > in a window. When I added hlock before the drawpicture calls the random
  273.  
  274. There must be some other explanation.
  275.  
  276. In general, if the system accepts a handle as input, then it is prepared to
  277. deal with the consequences of the handle's data moving.  The only exception
  278. I know to this is playing a sound handle asynchronously.  (Even then that's
  279. not strictly an exception because the Sound Manager does lock down the
  280. handle for the duration of the call; it's just that when called
  281. asynchronously the sound plays beyond the extent of the call.)
  282.  
  283. Larry Rosenstein
  284. Taligent, Inc.
  285.  
  286. lsr@taligent.com
  287.  
  288. +++++++++++++++++++++++++++
  289.  
  290. From: rmf@chopin.cs.columbia.edu (Robert M. Fuhrer)
  291. Date: 28 Sep 92 22:32:53 GMT
  292. Organization: Computer Science Dept., Columbia Univ.
  293.  
  294. I am also being bitten by a Picture-related bug. I am attempting to associate a
  295. PicHandle with a window so that future updates are handled automatically (as
  296. per IM Vol 1, Window Mgr chapter). It seems to work for a stand-alone test
  297. program, but in a more significant one, crashes at the call to SetWindowPic(),
  298. even though the window displays the picture ok just before that. Any clues?
  299.  
  300. The simplified code looks like:
  301.  
  302. void Graph(WindowPtr macWin)
  303. {
  304.     PicHandle    pH;
  305.     static Rect    bounds = { 50, -630, 450, -10 };
  306.  
  307.     KillPicture(GetWindowPic(macWin));
  308.  
  309.     SelectWindow(macWin);
  310.     SetPort(macWin);
  311.  
  312.     pH = OpenPicture(&bounds);
  313.  
  314.     ShowPen();
  315.     EraseRect(&bounds);
  316.  
  317.     /* ... calls to MoveTo(), Line(), etc. */
  318.  
  319.     ClosePicture();
  320.     SetWindowPic(macWin, pH);
  321. }
  322. - --
  323.  
  324. - -- Bob
  325.  
  326. +++++++++++++++++++++++++++
  327.  
  328. From: lari@strauss.cs.unc.edu (Humayun Lari)
  329. Date: 29 Sep 92 00:46:20 GMT
  330. Organization: The University of North Carolina at Chapel Hill
  331.  
  332. In article <1r#pbzf.stever@netcom.com> stever@netcom.com (Steve Riggins) writes:
  333. >In article <15669@borg.cs.unc.edu> lari@strauss.cs.unc.edu (Humayun Lari) writes:
  334. [my problem with DrawPicture and the TCL deleted]
  335. [Steve suggested increasing the stack]
  336.  
  337. Actually, DrawPicture seems quite happy now. I'm asking it to draw 100x100
  338. pixel thumbnails of screen snapshots that were taken in 16-bit color, and it's
  339. shrinking and dithering them to 8-bit color with no problem. The application
  340. partition is only 384K -- the pictures themselves would take up that much
  341. memory if they were uncompressed -- but it's drawing them quite happily
  342. (from disk, no less!)
  343.  
  344. >Copybits uses
  345. >the stack, so often, 32K is not enough. Try and addition 64K.
  346.  
  347. If I remember correctly, the latest versions of CopyBits divide up their work
  348. so that they can do the job even if there isn't sufficient stack space, and
  349. even allocate memory if necessary. I hope that's true; otherwise, I guess
  350. I'll be increasing the stack size soon...
  351.  
  352. Humayun Lari
  353. (lari@cs.unc.edu)
  354.  
  355. +++++++++++++++++++++++++++
  356.  
  357. From: rmf@chopin.cs.columbia.edu (Robert M. Fuhrer)
  358. Date: 4 Oct 92 04:37:20 GMT
  359. Organization: Computer Science Dept., Columbia Univ.
  360.  
  361. I have received a couple of responses to my posting regarding my problem
  362. installing a PicHandle in a window. Thanks to those who responded for their
  363. help! Now, a summary of the results:
  364.  
  365. One person advised calling ClipRect() before the call; though I wasn't doing it
  366. before, adding a call didn't help. Another mentioned that SetWindowPic() was a
  367. trivial call; after disassembling it in Macsbug, I saw that that was true; it
  368. does literally stuff the handle in the window record field and return.
  369.  
  370. I started to suspect other problems, probably memory-related. I tried using
  371. Macsbug "heap spy"; this turned up nothing. However, when I did a heap dump, I
  372. noticed that a control handle for an active modal dialog was unlocked and
  373. purgeable. I suspected this might be a problem. Does this sound reasonable?
  374.  
  375. Unfortunately, locking the handle didn't solve the problem anyway. Any other
  376. clues?
  377.  
  378. This snooping did lead to another confusing problem:
  379.  
  380. I have a modal dialog which has a scroll bar control item in it. The item's
  381. type is thus "control" (4), and the sub-type is scroll-bar (3). If I look at
  382. the DITL resource in ResEdit, the item number is 15. (Which is good, because my
  383. Rez source builds it that way.) Now, when I do a GetDItem() on item #15, it
  384. returns a handle which doesn't match the handle Macsbug reports as the only
  385. CTRL handle in the application. [It always seems to be off by 4 bytes.]
  386.  
  387. Am I missing something here?
  388. - --
  389.  
  390. - -- Bob
  391.  
  392. +++++++++++++++++++++++++++
  393.  
  394. From: jbush@magnus.acs.ohio-state.edu (J Eric Bush)
  395. Date: 4 Oct 92 15:47:52 GMT
  396. Organization: The Ohio State University
  397.  
  398. I have used DrawPicture quite a bit, and I admit that I am starting to read
  399. this strand late in the discussion, but here is some pascal code that I
  400. use with DrawPicture to draw PICT resources:
  401.  
  402. procedure DrawPict(whichPicture:integer);
  403.  
  404. var
  405.      thePicture : PicHandle;
  406.      myRect, pictureRect : Rect;
  407.  
  408. begin
  409.      thePicture:=GetPicture(whichPicture);
  410.      pictureRect:=thePicture^^.picFrame;
  411.      SetRect(myRect,0,0,pictureRect.right-pictureRect.left,
  412.           pictureRect.bottom-pictureRect.top);
  413.      DrawPicture(thePicture, myRect);
  414. end;
  415.  
  416. Note: if you want to display only part of a picture on the screen, then
  417.       add another RECT variable and set that rectangle to the part of
  418.       the screen you want it to display in (also works with regions),
  419.       then call SetClip or ClipRect procedure followed by DrawPicture.
  420.  
  421. Hope this is what you wanted, if not, then disregard as 1's and 0's.
  422. - -- 
  423. - ------------------------------------------------------------------------------
  424. J. Eric Bush
  425. Internet: jbush@magnus.acs.ohio-state.edu
  426.  
  427. ---------------------------
  428.  
  429. From: jmk3@crux3.cit.cornell.edu (Jay Krell)
  430. Subject: >moving the mouse
  431. Date: 4 Oct 92 03:39:29 GMT
  432. Organization: Cornell Information Technologies
  433.  
  434. >> Jay Kreibich, moving the mouse
  435.  
  436. The IIGS Event Manager has a call FakeMouse that drivers use to move the mouse.
  437. Perhaps the Mac has the same.
  438.  
  439.  
  440. jay.krell@cornell.edu.
  441.  
  442. +++++++++++++++++++++++++++
  443.  
  444. From: creiman@netcom.com (Charles Reiman)
  445. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  446. Date: Sun, 4 Oct 1992 17:17:21 GMT
  447.  
  448. jmk3@crux3.cit.cornell.edu (Jay Krell) writes:
  449.  
  450. >>> Jay Kreibich, moving the mouse
  451. >The IIGS Event Manager has a call FakeMouse that drivers use to move the mouse.
  452. >Perhaps the Mac has the same.
  453.  
  454. Nope. You must muck with system globals. From memory, you must change
  455. both MTemp and RawMouse to the coordinate you want. That should do the
  456. trick. Note that this is dangerous, since a VBL could hit while you are
  457. changing the variables, and the jCrsrTask will proceed to move the
  458. pointer on its own to a strange new location.
  459.  
  460. FYI: This is based on what I know from beating up on the jCrsrTask. I
  461. have never actually done this from an application environment.
  462.  
  463. - --
  464. Charlie Reiman             |                  creiman@netcom.com
  465. "This week, Ross Perot guaranteed his place in the record books by playing
  466. peek-a-boo with nearly 250 million people simultaneously."
  467. - -- 
  468. Charlie Reiman             |                  creiman@netcom.com
  469. "This week, Ross Perot guaranteed his place in the record books by playing
  470. peek-a-boo with nearly 250 million people simultaneously."
  471.  
  472. +++++++++++++++++++++++++++
  473.  
  474. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  475. Date: 4 Oct 92 23:52:31 GMT
  476. Organization: Kalamazoo College
  477.  
  478. creiman@netcom.com (Charles Reiman) writes:
  479. >
  480. >From memory, you must change
  481. >both MTemp and RawMouse to the coordinate you want. That should do the
  482. >trick. Note that this is dangerous, since a VBL could hit while you are
  483. >changing the variables, and the jCrsrTask will proceed to move the
  484. >pointer on its own to a strange new location.
  485.  
  486. Hmmmmm, interesting.  Have you tried setting the byte at CrsrBusy
  487. (0x08CD) while you change the globals?  That might keep the system off
  488. your back...?
  489. - -- 
  490.  Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
  491.  I tried to sleep my way to the top
  492.  But my alarm clock always woke me right up
  493.  
  494. ---------------------------
  495.  
  496. From: yjc@po.cwru.edu (Jerome Chan)
  497. Subject: CTB Questions and Answers
  498. Date: 5 Oct 92 04:11:22 GMT
  499. Organization: The Tofu Society of Singapore
  500.  
  501. I've had several questions about the Communications Tool Box and now I have
  502. some muddled Answers.
  503.  
  504. 1) How do I set the size of the Window Before Calling TMNew?
  505.    Call TMNew with an invisible Window. Then call TMGetTermEnvirons,
  506. calculate the actual size of the window from textRows,textCols,cellSize or
  507. graphicSize, resize the window and make it visible. Do I have to worry
  508. about changing the termRect, viewRect and visRect values?
  509.  
  510. 2) Can anyone explain what a MyClickLoop is supposed to do?
  511.    Someone replied that all it did was to return true if the click was in
  512. the cached region. If I'm not implementing a cache reqion, I can put a 0L
  513. for the myClickProc parameter in TMNew? I don't have to worry about
  514. highlighting and such?
  515.  
  516. - ---
  517.  The Evil Tofu
  518.  
  519. +++++++++++++++++++++++++++
  520.  
  521. From: mspace@netcom.com (Brian Hall)
  522. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  523. Date: Mon, 5 Oct 1992 06:48:46 GMT
  524.  
  525. In article <yjc-041092235931@b61539.student.cwru.edu> yjc@po.cwru.edu (Jerome Chan) writes:
  526. >2) Can anyone explain what a MyClickLoop is supposed to do?
  527. >   Someone replied that all it did was to return true if the click was in
  528. >the cached region. If I'm not implementing a cache reqion, I can put a 0L
  529. >for the myClickProc parameter in TMNew? I don't have to worry about
  530. >highlighting and such?
  531.  
  532. That is partially true.  The clickloop returns a boolean, which should
  533. be TRUE if the click was in the terminal region.  If you are not going to
  534. do a cache region, you don't even need to do a ClickProc - the idea of
  535. the proc is for you to handle auto-scroll, hilighting, selection, and
  536. all that fun stuff in the cache region.
  537.  
  538.  
  539. - -- 
  540.  
  541.  \ | /   | Brian Hall                 mspace@netcom.com
  542.  - : -   | Mark/Space Softworks       Applelink: markspace
  543.   /|\    |                            America Online: MarkSpace
  544.  |-+-|   |
  545. /-\|/-\  | The tornado ate my powerbook.
  546.  
  547. ---------------------------
  548.  
  549. From: jb6o+@andrew.cmu.edu (Jason Andrew Barshay)
  550. Subject: CASE tools
  551. Date: 30 Sep 92 05:24:14 GMT
  552. Organization: Robotics Institute, Carnegie Mellon, Pittsburgh, PA
  553.  
  554.  
  555. I am interested in finding any information on CASE tools for the
  556. Macintosh.  If you know of any products, have experience with them, have
  557. the address of vendors, or anything else, I would appreciate the
  558. information you could give me.  Please send your repsonses (or at least
  559. CC) them to this account.
  560.  
  561. Thanks,
  562. Jason
  563.  
  564. +++++++++++++++++++++++++++
  565.  
  566. From: franke@llnl.gov (Norman Franke, III)
  567. Date: 30 Sep 92 18:14:38 GMT
  568. Organization: Lawrence Livermore National Laboratory
  569.  
  570. In article <semOdye00XQU8E11pU@andrew.cmu.edu> Jason Andrew Barshay,
  571. jb6o+@andrew.cmu.edu writes:
  572. >I am interested in finding any information on CASE tools for the
  573. >Macintosh.  If you know of any products, have experience with them, have
  574. >the address of vendors, or anything else, I would appreciate the
  575. >information you could give me.  Please send your repsonses (or at least
  576. >CC) them to this account.
  577.  
  578. I posted a similar question here are the responses I got:
  579.  
  580. But first, we "selected" TurboCASE from Struct Soft, Inc.
  581.  
  582. 206-644-9834
  583.  
  584. However, TurboCASE is probably the worst piece of software I have ever
  585. seen for the Mac. It has numerous bugs, and the WORST interface known
  586. to MacMan. But, it's also the least expensive. Also, the manual is
  587. worthless and seems to be written for a different version of the 
  588. software.
  589.  
  590. (The US Number for DEFT, is 617-238-6100, and I spoke with John Baron for
  591. an evaluation copy.)
  592.  
  593. = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - 
  594. Date: Tue, 15 Sep 92 11:12:56 PDT
  595. From: hoyt@godzilla.quotron.COM (Bob Hoyt)
  596. Subject: RE: CASE Software
  597. To: franke@llnl.GOV
  598. Organization: Quotron Systems, Inc.
  599.  
  600. You ought to at least look at Deft, a CASE tool which we have had here at
  601. Quotron Systems for a couple of years.  It does Data Flow Diagrams, Entity
  602. Relationship Diagrams, Program Structure Diagram, and from these will
  603. create
  604. forms and/or reports.  It keeps a data base of everything that you enter,
  605. so even misspellings can be caught.
  606.  
  607. When we first considered it, they had a free demo which showed off most of
  608. their features.  For that, or more specific information, you can contact
  609. them at:
  610.  
  611.     DEFT            (Home Office)
  612.     Suite 111, 557 Dixon Rd.
  613.     Toronto (Rexdale), Ontario
  614.     M9W 1H7, Canada
  615.     Sales:    (416) 249-2246
  616.     FAX:    (416) 243-5043
  617.  
  618. (They have a West Coast office, but I believe that my address for that is
  619. out of date.  Let me know if you need me to look it up.
  620.  
  621. As usual, it's disclaimer time.  These statements represent my opinion
  622. only,
  623. not that of Quotron Systems, Inc., its management, etc., etc.
  624.  
  625. Good luck,
  626.  
  627. Bob Hoyt
  628. - -- 
  629. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  630. ++++++
  631. Email address:    hoyt@quotron.com    |  The first to plead his case seems
  632. just,
  633.                     |  until another comes and examines him.
  634. Phone Number:    (310) 302-4149        |  Prov. 18:17
  635. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  636. ++++++
  637.  
  638. = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - 
  639. Date: Tue, 15 Sep 92 12:26:10 MST
  640. From: Duke_Beattie@chdqm1.sps.mot.COM (Duke Beattie)
  641. Subject: RE: CASE Software
  642. To: franke@llnl.GOV
  643. Organization: Motorola ASIC
  644.  
  645. You might try contacting Excel Software at:
  646.                              PO Box 1414
  647.                              Marshalltown, Iowa 50158
  648.                              (515) 752-5359
  649. They have pretty good Analysis and Design programs.
  650.  
  651. Duke
  652.  
  653. = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - 
  654. Date: Sat, 19 Sep 92 14:37:01 -0500
  655. From: tonyrich@cs.wisc.EDU (Anthony Rich)
  656. Subject: RE: CASE Software
  657. To: franke@llnl.GOV
  658. Organization: University of Wisconsin, Madison -- Computer Sciences Dept.
  659.  
  660. Hi, Norman.  You write:
  661.  
  662. I'm teaching a SE class here at UW-Eau Claire this semester.  In the
  663. Instructor's Guide to the textbook "Software Engineering with Student
  664. Project Guidance" by Barbee Teasley Mynatt (Prentice-Hall) is a list of
  665. available CASE tools for lots of platforms.  The book is copyright 1990,
  666. so
  667. this info may be out of date.  No platform is specified for some of the
  668. software listed; here are the ones that it says will run on the Mac.
  669. I haven't used any of them.
  670.  
  671.   -- Tony
  672.  
  673.  
  674.  
  675. Design/2.0
  676. Meta Software Corp.
  677. 150 Cambridge Park Drive
  678. Cambridge, MA 02140
  679. (800)227-4106
  680. (617)576-6920
  681.  
  682. A drawing package that facilitates the manipulation of text and
  683. graphics components.  System designs, org charts, flowcharts,
  684. and presentation graphics can be created.  Allows the user 
  685. connect objects; connected objects are automatically rebuilt
  686. when a diagram is edited.
  687.  
  688.  
  689. MacBubbles
  690. StarSys, Inc.
  691. 11113 Norles Drive
  692. Silver Spring, MD 20902
  693. (301)946-0522
  694.  
  695. A dataflow diagram editor for the Mac.
  696.  
  697.  
  698. Powertools (formerly Prism)
  699. Iconix Software Engineering
  700. 1037 Third Street
  701. Suite 105
  702. Santa Monica, CA 90403
  703. (213)458-0092
  704.  
  705. A variety of tools, including Free-Flow (a dataflow diagram editor
  706. with mini-specifications), FastTask (for real-time software development),
  707. PowerPDL (a pseudocode processor that generates formatted documentation),
  708. and SmartChart (a structure chart generator).
  709.  
  710. = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -
  711.  
  712. | | | |   +----------------------------------------+
  713. | | | |   | Lawrence Livermore National Laboratory |
  714. | | | |__ |        Computer Scientist - EPD        |
  715. | | |___/ |     T-5475, R-1321, (510) 422-7440     |
  716. \ \____/  | Norman Franke, III - frankee@.llnl.gov |
  717.  \____/   +----------------------------------------+
  718.  
  719. +++++++++++++++++++++++++++
  720.  
  721. From: jb6o+@andrew.cmu.edu (Jason Andrew Barshay)
  722. Date: 4 Oct 92 16:29:27 GMT
  723. Organization: Robotics Institute, Carnegie Mellon, Pittsburgh, PA
  724.  
  725.  
  726. I am interested in finding any information on CASE tools for the
  727. Macintosh.  If you know of any products, have experience with them, have
  728. the address of vendors, or anything else, I would appreciate the
  729. information you could give me.  Please send your repsonses (or at least
  730. CC) them to this account.
  731.  
  732. Thanks,
  733. Jason
  734.  
  735. ---------------------------
  736.  
  737. From: karlberg@e.kth.se (KRILLE_KROKODIL)
  738. Subject: Changing 'STR#'s
  739. Organization: KTH, Royal Institute of Technology, School of Electrical Engineering
  740. Date: Thu, 1 Oct 1992 01:01:10 GMT
  741.  
  742. How do I change the contents of STR  and STR# recources from Think Pascal?
  743.  
  744. Martin
  745.  
  746. - -------------------------------------------------------------------------------
  747.                                     If you have a living frog for breakfast,   
  748.                                     nothing worse can happen during the day.  
  749.  
  750. +++++++++++++++++++++++++++
  751.  
  752. From: wirehead@cheshire.oxy.edu (David J. Harr)
  753. Organization: The programmers who say NEE!
  754. Date: Sun, 4 Oct 1992 15:58:20 GMT
  755.  
  756. In article <009616B5.D3D76A00@e.kth.se> karlberg@e.kth.se (KRILLE_KROKODIL) writes:
  757. >How do I change the contents of STR  and STR# recources from Think Pascal?
  758. >
  759. >Martin
  760. >
  761. >-------------------------------------------------------------------------------
  762. >                                    If you have a living frog for breakfast,   
  763. >                                    nothing worse can happen during the day.  
  764.  
  765. Here's a routine I use for changing the contents of a STR# resource on the
  766. fly. Caveats: I quickly adapted it from another routine that does almost the
  767. same thing but is a bit more specialized, so it may have a bug or two due to
  768. the quick dismemberment/reassembly from the old routine, and it will allocate
  769. a temporary handle the size of the new STR# resource, so if you have a very
  770. large STR# resource you are trying to change and you are short on space, it
  771. will fail without returniing any warning (because it is a void function).
  772. It is not in Pascal, but it should be fairly simple to translate.
  773. Here is the code:
  774.  
  775. void write_str(short index, short res_id, Str255 new_str)
  776. {
  777.     Handle str_handle, temp_handle;
  778.     short res_id, num_strings, i;
  779.     long lead_bytes, end_bytes, hand_size, new_hand_size;
  780.     
  781.     str_handle = Get1Resource('STR#', res_id);
  782.     if(!str_handle)
  783.         return;
  784.     hand_size = GetHandleSize(str_handle);
  785.     if(MemError())
  786.         return;
  787.     num_strings = **((short**)str_handle);
  788.     lead_bytes = 2;        /* skip over number of strings in STR# resource */
  789.     for(i = 1; i < index; i++)
  790.     {
  791.         lead_bytes += (*((unsigned char**)str_handle))[lead_bytes] + 1;
  792.     }
  793.     if(index != num_strings)
  794.         end_bytes = lead_bytes + (*((unsigned char**)str_handle))[lead_bytes] + 1;
  795.     else 
  796.         end_bytes = 0;
  797.     new_hand_size = lead_bytes;
  798.     new_hand_size += (unsigned char)new_str[0] + 1;
  799.     if(end_bytes)
  800.         new_hand_size += hand_size - end_bytes;
  801.     temp_handle = NewHandle(new_hand_size);
  802.     if(!temp_handle)
  803.         return;        /* NewHandle failed */
  804.     HLock(str_handle);
  805.     HLock(temp_handle);
  806.     memcpy(*temp_handle, *str_handle, lead_bytes);
  807.     memcpy(*temp_handle + lead_bytes, new_str, new_str[0] + 1);
  808.     if(end_bytes)
  809.         memcpy(*temp_handle + lead_bytes + new_str[0] + 1, 
  810.                     *str_handle + end_bytes, hand_size - end_bytes);
  811.     HUnlock(temp_handle);
  812.     HUnlock(str_handle);
  813.     SetHandleSize(str_handle, new_hand_size);
  814.     HLock(str_handle);
  815.     HLock(temp_handle);
  816.     memcpy(*str_handle, *temp_handle, new_hand_size);
  817.     HUnlock(temp_handle);
  818.     HUnlock(str_handle);
  819.     DisposeHandle(temp_handle);
  820.     ChangedResource(str_handle);
  821.     if(ResError())
  822.         return;
  823.     WriteResource(str_handle);
  824. }
  825.  
  826.  
  827.  
  828. Hope this is of some interest to the folks on the net!
  829.  
  830. David.
  831.  
  832. "Your excellency, the workers of Freedonia are demanding shorter hours!"
  833. "We'll give them shorter hours. Cut their lunch hour to twenty minutes."
  834.  
  835. ---------------------------
  836.  
  837. From: dlb5404@tamsun.tamu.edu (Daryl Biberdorf)
  838. Subject: Vendors for Mac assemblers?  Which are decent?
  839. Organization: Texas A&M University, College Station
  840. Date: Sat, 3 Oct 1992 06:04:39 GMT
  841.  
  842. In the near future (right now!), I'll be doing a lot more 68k development
  843. work in assembly, not all of it for my Mac.  As a result of this, I'd
  844. like to get a 68k assembler for my PowerBook 100.
  845.  
  846. So far I haven't been able to find many assemblers, and the ones I've
  847. found I've heard nothing about.
  848.  
  849. Can anyone tell me what vendors offer assemblers for the Mac as well
  850. as approximate prices and whether the product is any good?  I'd
  851. really like to be able to single-step through the code and set breakpoints,
  852. if these are not common features.
  853.  
  854. Thanks in advance for any advice.
  855.  
  856. Daryl
  857.  
  858.  
  859. - -- 
  860. Daryl Biberdorf  N5GJM    d-biberdorf@tamu.edu or  dlb5404@tamsun.tamu.edu
  861.  
  862.  
  863. +++++++++++++++++++++++++++
  864.  
  865. From: davids@engin.umich.edu (David Snearline)
  866. Date: Sat, 03 Oct 92 06:51:16 EDT
  867. Organization: University of Michigan Engineering, Ann Arbor
  868.  
  869. In article <1992Oct3.060439.11291@tamsun.tamu.edu> dlb5404@tamsun.tamu.edu (Daryl Biberdorf) writes:
  870. >In the near future (right now!), I'll be doing a lot more 68k development
  871. >work in assembly, not all of it for my Mac.  As a result of this, I'd
  872. >like to get a 68k assembler for my PowerBook 100.
  873. >
  874. >So far I haven't been able to find many assemblers, and the ones I've
  875. >found I've heard nothing about.
  876. >
  877. >Can anyone tell me what vendors offer assemblers for the Mac as well
  878. >as approximate prices and whether the product is any good?  I'd
  879. >really like to be able to single-step through the code and set breakpoints,
  880. >if these are not common features.
  881. >
  882. >Thanks in advance for any advice.
  883.  
  884. For serious work with 68k assembler on the Mac, I would recommend Apple's
  885. MPW assembler.  As is the usual recommendation for MPW, disk space and
  886. memory are a must, although it is possible to strip MPW down to 2 megs
  887. or so if you are only using the assembler.  In conjunction with MacsBug,
  888. this should be everything you need.
  889.  
  890. For occasional assembler coding, the THINK C inline assembler is decent
  891. if you don't need macro capabilities.  I like using the inline assembler
  892. for routines within a larger THINK C or Pascal project.
  893.  
  894. - -- 
  895. David Snearline            CAEN Networking and Operations
  896. davids@engin.umich.edu        University of Michigan Engineering
  897.  
  898. +++++++++++++++++++++++++++
  899.  
  900. From: Glen.Stewart@f175.n2240.z1.ieee.org (Glen Stewart)
  901. Date: 6 Oct 92 01:18:11 GMT
  902. Organization: FidoNet node 1:2240/175 - The Associati, Grand Blanc MI
  903.  
  904. How about this one?
  905.  
  906. Programming - #13, 139 files
  907. ============================
  908.  
  909. mcassembly 7.6.cpt  :   495k+:by Dave McWherter - an assembler, rsrc compiler,
  910.                         linker, and job controller for the Macintosh. Includes
  911.                         "local symbols", macros, source print formatting.
  912.                         McAssembly also contains a built-in Resource Compiler
  913.                         which can assemble resource definitions. Simple docs,
  914.                         more upon registration. $50 ShareWare.
  915.  
  916.  
  917. You can call this BBS at 313-695-6744 (HST) or 313-695-6955 (v.32bis)
  918. Downloads available on first call.
  919.  
  920. - --  
  921. =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  922.  Glen Stewart - Internet: Glen.Stewart@f175.n2240.z1.ieee.org
  923.  
  924. ---------------------------
  925.  
  926. End of C.S.M.P. Digest
  927. **********************
  928.