Path: utzoo!utgpu!watmath!att!tut.cis.ohio-state.edu!rutgers!usc!polyslo!dorourke
From: dorourke@polyslo.CalPoly.EDU (David M. O'Rourke)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Can anyone answer these Questions?
Message-ID: <13547@polyslo.CalPoly.EDU>
Date: 15 Aug 89 00:51:13 GMT
References: <840@eutrc3.urc.tue.nl>
Reply-To: dorourke@polyslo.CalPoly.EDU (David M. O'Rourke)
Organization: Cal Poly State University -- San Luis Obispo
Lines: 71

rcbaem@eutrc3.urc.tue.nl (Ernst Mulder) writes:
>1) [asks about the 3k stack limit using copy bits...]

  I don't belive that's it's an issue anymore with the larger memeory
  machines.  I remember reading that tid bit somewhere, but I can't
  find it now.  {my kingdom for a complete x-ref of my personal memory so
  that I could used it for a subject search  :-)}

>2) [asks about routines for selecting graphics....]

  Volume 4, pages 24 & 25 have some routines that might be able to help you
  out.  I've heard they can be used to build a graphics selection routine
  but I've never done it myself.

>3) What is the best way to update the default button's outline in a
>   dialogbox? (For when a screensaver or so makes it disappear)

  If you're using modal dialog I don't know of a great way to do it.  Most
  Mac programmer's I know have gotten around to building their own 
  ModalDialog that does it automaticly when it gets an update event.

  But I guess you could make the outline portion of the button a useritem
  in the dialog list, and then have your draw routine simply draw the 
  rectangle, modal dialog will then call your draw routine to accomplish
  update, and volia your default rectangle gets redrawn.....

  You can find additional information regarding user item's in inside mac
  volume 1, pages 404 & 405, & 421..

>4) [asks about gettine too many activate events after disposing of
     a dialog]

  That's a toughy, I've not noticed that behavior in my own code, but then
  again I haven't really looked.  I can think of two possibilities...

  1)  You're getting the leftover deactive event from when you originally
      put the dialog on the screen.  If that's the case you need to 
      handle deactivate events why you're checkking for the mouse.

  2)  You're getting a deactive event frow clossing the dialog, and
      possibly not checking the message field to see which window it's for.

>5) [questions about leaving a file open or closing it while the use has
     a window open to it...]

  I've seen both behaviors.  I personally prefer letting the user do what
  ever they want with a file after I've read in the data.  I've found it
  quite difficult to explain to non-computer mac people why they can't
  play with a file in the finder just because it's open in another application
  so to avoid the problem my software open and closes.

  But again I feel this one is a judgment call, and depends on the programmer
  target user, and a varity of un-scientific principals called "do I feel
  like coding this routine up???"

>6) [asks about detecting bad #'s using SANE....]

  Well, I know this in in-effiecient but I conver the number from str->binary
  and then from binary->str, and see if the two str's are equal, if they are
  then you got a #, if not you don't.  Better methods anyone??

> Any help appreciated. I want my first Mac programm to be a very good one. :)

  I hope you find the answers useful.

> Ernst.
-- 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\|/////////////////////////////////////////
David M. O'Rourke____________________|_____________dorourke@polyslo.calpoly.edu
|  God doesn't know, he would have never designed it like that in the first   |
|_ place. ____________________________________________________________________|