HDTenEightyP/NetNews huggingface dataset:
From: bernard@cs.colorado.edu (Bernie Bernstein)
Subject: How do you systematically test?
Followup-To: comp.sys.mac.programmer
Organization: University of Colorado at Boulder
Date: Wed, 27 Jan 1993 17:49:39 GMT

My program is getting very large, and I need a more systematic way of
testing it. I keep coming across the problem that each time I release a
new beta version, I find new bugs that I added that I know didn't exist
in earlier versions.

I would like to be able to run an automated test that checks all of the
features that were working before so that I will know if I threw off an
old feature by adding a new one.

I have heard of Virtual User and would like to hear about what it takes
to write scripts with it. I would also like to know if there are any
other products out there that can do this. I suppose it might be possible
to program a bunch of QuickKeys to test the features.

I don't need the full power of Virtual User because I will only be testing
on one machine at a time. How much time would I need to invest in learning
how to use it?  Are there any products that don't require MPW?

Please email and I will summarize the useful information.

Thanks

    o,  ,,   ,      | Bernie Bernstein                    | ,    ,,
    L>O/  `,/ `    ,| University of Colorado at Boulder   |/ `,,/  `
   O./  '  / . `, / | home: 303-444-3168                  |     / ` `  ,.
  ,/   /  ,      '  | email: bernard@cs.colorado.edu      | /        ''  `
Newsgroups: comp.sys.mac.programmer
From: gdl1000@cus.cam.ac.uk (G.D. Landweber)
Subject: Re: Geneva 9 Radio Buttons, Checkboxes, etc...
Organization: U of Cambridge, England
Date: Mon, 25 Jan 1993 12:37:41 GMT

Another way to get your pushbuttons, radio buttons and check boxes
in Geneva 9 is to use Lloyd Lim's Default CDEF (version 2.4 should
be available on the internet archives these days).  It saves you
the trouble of creating your own CNTL resources.  You'll still need
to change the font of the dialog box to Geneva 9, though.

-- Greg "Buttons" Landweber
From: mcote@celine.sw.stratus.com (Mike Cote)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Macintosh Doggles...
Date: 22 Jan 1993 21:54:59 GMT
Organization: Stratus Computer Inc, Marlboro MA
Distribution: world
Reply-To: mcote@celine.sw.stratus.com (Mike Cote)
NNTP-Posting-Host: celine.sw.stratus.com


I use them to protect programs that I am developing for customers while I am 
actually doing the development work.  Once the customer finishes payment, they
are free to either keep using the dongle for their own protection or I'll
remove it from the program.

They only conflict with the ADB if you are trying to use the keyboard or mouse
while the program is actually accessing the dongle. It does a good job for the 
purpose I use it for.  

mpac
From: kanderso@liege.ICS.UCI.EDU (Kenneth Anderson)
Subject: Palettes and Color Tables
Newsgroups: comp.sys.mac.programmer
Date: 25 Jan 93 01:17:19 GMT

In the course of messing around with PICTs, I discovered the PICT Utilities.
I have written a small program, which allows you to select a PICT file,
read it in, and then print out some information on the PICT in a window.

In making the call to GetPictInfo, I requested that both a Color Table and
a Palette be returned.  Then, in my information window, I print out the
following values

The Palette's pmEntries   => -2900
The Color Table's seed    => -190028262
The Color Table flags     => 9849
The Color Table Size      => 882

These are not the values that I expected.  When I did the call to GetPictInfo,
I requested 256 colors.  I assumed that this meant that the returned Palette
and Color Table would have 256 entries each, but that's what I get for
assuming!

Oh by the way, the GetPictInfo call returns 32 as the Picture's depth.  Is
this a legal value?  I was expecting 24 since I was reading a PICT created by
POV-RAY, a ray tracer for the Mac.

I am using the function NumToString to convert the values stored in the
PictInfo data structure from numbers into strings, and then I use DrawString
to print the values to my window.

There are several questions that I would love to have people comment on:

1.  Are there cases where GetPictInfo will not return a valid Palette/Color
    Table?

2.  Is it reasonable to assume that the Palette and the Color Table returned
    by GetPictInfo will contain the same information?

3.  Can someone give me a description of what the fundamental distinction is
    between a Palette and a Color Table?  I.E. when would you want to use one
    over the other?

Thanks in advance,

Ken

P.S. Please respond to the newsgroup, I read it each day, and won't miss
     any responses...

P.P.S. Thanks to those people who answered my question about converting
       a Handle to a PicHandle.  It turned out that when I read in the
       Data Fork of the PICT file, I forgot (actually I didn't even know
       I was supposed to do this) to skip the 512 byte header.  Once I
       did that, I could convert the Handle to a PicHandle no problems...
From: awmin@athena.mit.edu (Art Min)
Newsgroups: comp.sys.mac.programmer
Subject: Need Source for Modem Communcation
Summary: Modem Source Wanted
Keywords: modem, source
Date: 21 Jan 93 19:04:33 GMT
Distribution: world, local
Organization: Massachusetts Institute of Technology

Hello everybody,

Could somebody either send me some generic source code, or point
me in the direction of some soure code that will help me write an
application that will be able to use the modem. It'll need to be
able to connect to either a Mac or a PC (booo, hisssss).

I looked around the umich archives but didn't find anything. Am I
missing something?

ANY help would be greatly appreciated. Email would be great, posting
will be fine too. I'll summarize if there's a lot of info.

Thanks a lot.

Art
awmin@athena.mit.edu
Newsgroups: comp.sys.mac.programmer
From: mlz@asacsg.mh.nl (Arne Maletzky)
Subject: Re: Lightspeed Pascal Bug!
Organization: ASAC Nederland b.v.
Date: Tue, 26 Jan 93 14:09:29 GMT

jvanabra@nyx.cs.du.edu (Josh Van Abrahams) writes:
: My school is currently using Lightspeed Pascal Version 2.0 on Mac LC II's
: to teach pascal on.  The editor works fine, however that code that it
: generates creates a bus error when ran.  What can I do about that?  What
: version is the current release?
: Any help would be appreciated.
: 
: Josh Van Abrahams
: jvanabra@nyx.cs.du.edu
:
Check out the run options . If you use resources in your code and you
have not set up the resource file to use you get an bus error
And it's restart.

Arne
-- 
Arne Maletzky 		            mlz@mh.nl via internet backbones
Multihouse Computer Services        uucp: ..!{uunet,sun4nl}!mh.nl!mlz
Coencoop 7, 2741 PG Waddinxveen,  The Netherlands
----------------------------------------------------------------------
From: lederman@taney.uscghq.uscg.mil
Newsgroups: comp.sys.mac.programmer
Subject: Fix a module or start fresh?
Date: 22 Jan 93 09:36:23 EST
Organization: United States Coast Guard

  
    I seem to remember seeing some guidelines for programming and
 program maintenance a few years ago from an "expert".  One
 suggestion was that if you had to replace more than xx% of the
 lines in a module, it was better to throw it out and start over
 again.  Unfortunately, I don't remember the percentage, or the
 person who said it.

    Does anyone remember seeing this, and does anyone know the
 source?

    Thanks.

    (I'd prefer email to lederman@eisner.decus.org, because our
 news feed is a bit erratic, but I'll take what I can get.)
From: cconstantine@galaxy.gov.bc.ca
Newsgroups: comp.sys.mac.programmer
Subject: Extension/FKey idea!!??
Date: 22 Jan 93 12:28:51 -0800
Organization: BC Systems Corporation

Here's an idea if no one has done it yet.

Under System 6 with Multifinder you can click on the icon in the top right hand
corner to switch from application to application.  Or you can go to the Apple
Menu and select the application you want.

Under System 7 you go to the top right corner and pull down to the application
you want.  If you use JustClick 1.02 you can get the same functionality of just
clicking once on the icon in the top right corner of the screen to cycle
through applications.

In Windows (Lord Forbid) you can just hit Alt-Tab and cycle through the
applications that are open.

My idea is to write an FKey/System Extension that has the Windows 
Functionality to the System.
If this has been done already, can some point me to where I can get it.

Thanks.

Carl B. Constantine
CCONSTANTINE@galaxy.gov.bc.ca
From: rieger@msen.com (Steve Rieger)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Think Reference 2.0 Review
Date: 22 Jan 1993 14:33:01 GMT
Organization: Msen, Inc. -- Ann Arbor, Michigan
NNTP-Posting-Host: garnet.msen.com
X-Newsreader: TIN [version 1.1 PL8]

I'll try again. You can post THINK Refernces database files on a server.
When you launch the application, if TR can't find the database files,
it'll ask you for a folder to use, and remember the folder the next time
around. It also seems ok for multiple people to access the databases at
one time.

--steve rieger (riger@msen.com)
Newsgroups: comp.sys.mac.programmer
From: bell@apple.com (Mike Bell)
Subject: Re: adev and alap programming
Date: Tue, 26 Jan 1993 22:51:41 GMT
Reply-To: bell@apple.com (Mike Bell)
Organization: Apple Computer, Inc.

In article <GEORGE.93Jan26141453@sabre.cit.cornell.edu>, 
george@sabre.cit.cornell.edu (George Boyce) writes:
> From: george@sabre.cit.cornell.edu (George Boyce)
> Newsgroups: comp.sys.mac.programmer
> Subject: adev and alap programming
> Date: 26 Jan 93 14:14:53
> Organization: Cornell Information Technologies
> Lines: 13
> Distribution: comp
> Message-ID: <GEORGE.93Jan26141453@sabre.cit.cornell.edu>
> NNTP-Posting-Host: sabre.cit.cornell.edu
> 
> I'm working on an appletalk project and am looking for documentation
> or code samples if anyone has any they are willing to share. The
> documentation I have is apple's "EtherTalk and Alternate AppleTalk
> Connections Reference, working draft 3 - April 6, 1988" and "Appletalk
> Connections Programmer's Guide" (on order from APDA).
> 
> Does anyone have anything else they can share with me?
> 
> George
> --
> George Boyce, george@nr-tech.cit.cornell.edu
> Network Resources, Advanced Technologies and Planning
> Cornell Information Technologies, Cornell University, Ithaca NY


Unfortunately, there is no other documentation available. If you can find a 
copy of the CD from last years developer's conference, you might want to 
check out the notes from the presentation I gave on how to write an ADEV.


The only consolation is that they get easy to write.....by the fifth one or 
so.....




  -Mike





********************************************************

Mike Bell										     	       	      email: bell@apple.com
Senior Engineer
68000 High Performance Software Group
MS 60-CS
Apple Computer, Inc.
20525 Mariani Ave.
Cupertino, CA 95014

********************************************************
From: mssmith@afterlife.ncsc.mil (M. Scott Smith)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Arcade-style animation...
Date: 27 Jan 93 23:28:03 GMT
Organization: The Great Beyond


   Maybe I'm missing something..  But isn't it quite possible to find out the
base address of a video card -- most video cards, Apple and non-Apple alike?

   I hope so, because I've been doing this the past several months in a game
I'm writing and it seems to work fine so far on a variety of platforms.

   I wrote routines that scroll the screen to the right and left as well --
and they seem very quick.  I'm not using any "scrolling" features of a video
card; all you need to do to scroll a screen is move the bits around in the
right places -- the only limitation might be speed, but this doesn't seem
to be a problem either.

   I might not be doing everything safe, and I'm sure my routines will "break"
under certain circumstances, but -- a lot of programs write directly to the
screen and work fine.  System 7's one of them.

   Now I've got a few questions for the experts..

   I wrote a library of functions to handle "sprites" (for lack of better word;
pictures, whatever) -- I have one program which transforms high-level
graphics created with paint programs, etc., into the low-level bits that
I need to plot directly on the screen.  I then wrote a program that takes
the output of this program and writes a C function out of it -- this function,
when called, basically "stamps" the picture on the screen.

   I should note that it stamps the picture on screen much, MUCH quicker than
can conceivably be achieved with any of the Quickdraw calls.  It is very, very
fast.

   But, since I will most likely have lots of graphics in any program I have,
is this a good approach?  That is, what effect will be representing graphics
as C _code_ instead of data in a data file or the like?

   Already, with a few graphics, the program is HUGE (in terms of numbers of
lines; I don't think the size of the object code is much greater than if I
kept the bits in a PICT resource or something) -- how will this affect program
execution?

   Oh well..  Maybe I'm talking about something else, but if anyone needs
help with direct-screen graphics, I could probably help out a bit.  (But I
don't want to divulge *too* many of my secrets!  :)  I've labored hard to
find out how to do this stuff!)

Later,

M. Scott Smith
  (mssmith@afterlife.ncsc.mil || umsmith@mcs.drexel.edu)

P.S. I've found that working low-level is less of a headache than working
with all the Quickdraw calls, when looking for fast animation, etc.  The
Quickdraw graphics calls are ideal in most circumstances, but they couldn't
handle the kind of animation I'm looking for..  It would be nice if some of
this stuff was thoroughly documented somewhere, so it wasn't as much of a
mystery..  But I s'pose it's safest to stay with Quickdraw most of the time.
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Unix-like environment
Date: 21 Jan 93 21:39:06 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden

In <93021.172716HAC041@DJUKFA11.BITNET> HAC041@DJUKFA11.BITNET (Konrad Hinsen) writes:

>1) Unix-like tools
>   Are Emacs and the standard Unix-tools available for the Mac? If yes,
>   where can they be obtained?

Emacs, no. Standalone tools, yes; most run under the MPW Shell
which can be seen as a very strange kind of windowed UNIX shell...

>2) A/UX
>   Is it a realistic proposition to use A/UX as a development platform
>   for 'standard' Mac systems? Apple claims that normal Mac applications
>   can be used under A/UX, but how does it work out in practice?

Oh, it works well enough. However, the Mac part of the UNIX
process is slower than a "raw" Mac.

>   Are Emacs and the other GNU utilities available for A/UX, or has
>   FSF's boycot against Apple prevented that?

Nope, they're ftpable in source or compiled. You can not build
Mac applications using gcc, though; you'll have to run GNU Emacs
and MPW C separately.

Also, there's a good editor called "alpha" that looks a bit like
emacs, on the "raw" MacOS side.

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
 Engineering: "How will this work?" Science: "Why will this work?" Management:
 "When will this work?"  Liberal Arts: "Do you want fries with that?"
                     -- Jesse N. Schell
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Is the Finder's name always "Finder"?
Date: 25 Jan 93 01:57:43 GMT
Organization: University of Waikato, Hamilton, New Zealand

In article <01050133.og3hb4@distant.uucp>, edw@distant.uucp (Ed Watkeys) writes:
>
> In article <walkerj.727644025@milo.math.scarolina.edu> (comp.sys.mac.programmer), walkerj@math.scarolina.edu (Jim Walker) writes:
>>
>> I see that Finder's name is locked (under System 7), but is that always the
>> name, even under foreign system software?  If not, what is the best way to
>> get the name?  (I know how to read it from the boot blocks, and I know that
>> there is a low-memory global FinderName, but I wonder if there is a better
>> way.)
>>
>
> Since the signature stays the same (I assume), you can get it's name by
> cycling through GetNextProcess() (IM VI 29-11) until you find the Finder's
> process serial number and then use GetProcessInformation() (IM VI 29-10)
> to get its name. Of course, if the Finder isn't running, you're screwed in
> this case.
>
> Using PBCatSearch() (IM VI 25-40) would work in all cases, as far as I can
> see. Just set the criteria to be the Finder's type/creator, and let it go.

I would say: stick with the low-memory global approach. If you do anything
more complicated, you risk coming up with a different answer from what the
system would. For example, a catalog search could be confused by multiple
Finders on the boot disk.

On the other hand, the right answer really depends on what you want to do
with it. If you use the FinderName, then you will also respect any substitutions
of the standard Finder by alternative special-purpose programs. If the Finder
substitute lacks some function that you're assuming is present, you may be
in trouble.

Lawrence D'Oliveiro                       fone: +64-7-856-2889
Computer Services Dept                     fax: +64-7-838-4066
University of Waikato            electric mail: ldo@waikato.ac.nz
Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
Newsgroups: comp.sys.mac.programmer
From: gwatts@fnalo.fnal.gov
Subject: Re: Threads 2.0d17 does not work!
Organization: Fermi National Accelerator Lab
Date: Fri, 22 Jan 1993 07:45:47 GMT
X-Posted-From: fnalo.fnal.gov
NNTP-Posting-Host: sol.ctr.columbia.edu

In article <1jmg3eINNb61@life.ai.mit.edu>, peterc@hal.gnu.ai.mit.edu (Peter Creath) writes:
> Well, I checked out my problems carefully and even came up with a
> (unsuitable) workaround.
> 
> "Threads.lib" in the Threads 2.0d17 archive on ftp.apple.com is missing
> a vital routine.  Every time I try to link, I get (from Think C 5.0.4)
> 
> undefined label: GetGlobalStash (Threads.lib)

Yep.  I had this problem too.  I went and looked for the original message from
a fellow at Apple (I want to say his last name was Grobbins, but I might
be wrong!) -- but I've deleted it.

For some reason, they left that routine out of the ThinkC implementation.  You
have to use oConv (that comes with your ThinkC distrib) to convert the MPW
.o threads library to a Think project.  The MPW version has this key routine.

From what I understand, Threads was developed in Think C -- so it is a
bit ironic that the ThinkC library is lacking.  Also, no one is working
on Threads at apple (at least, this was true 6 or 7 months ago), with no
plans to do so in the future.  Too bad, I like the package. 

There is also a free ware/share ware (I don't recal) out there that provides 
the same functionality.  Unfortunately, I don't remember the name of the
damm package.  Perhaps someone will read this news and post it.  You get
the source with this package.  It doesn't support futures, however.

Good luck!

	Cheers,
		Gordon.

P.S.  If you include the threads resources in your application, make
sure to blank out the icon in that file.  When your app runs the first time,
you'll get a spurious icon showing up on your desktop (bug!).  If you
just make sure you don't have that icon (I think it is 128) in your app's
resource file, Threads will just beep.  Unfortunate -- wasn't that the
symptom of a virus; it would beep every now and then when you activated
an application?  Yeah, my Disinfectant manual tells me that was nVIR.
Newsgroups: comp.sys.mac.programmer
From: minow@apple.com (Martin Minow)
Subject: Re: Fix a module or start fresh?
Date: Tue, 26 Jan 1993 15:31:35 GMT
Organization: Macintosh Developer Services
Followup-To: comp.sys.mac.programmer

In article <1993Jan22.093623.128@taney.uscghq.uscg.mil>,
lederman@taney.uscghq.uscg.mil asked about a rule of thumb
as to how much code to replace before you throw out the
original and rewrite from scratch.

My rule of thumb is 25%, but I generally rewrite almost
everything, if only to get all my source code into a
consistent, coherent, format.  I.e., I can always
find if statements because they are always "if (",
never "if(".

Happy hacking.

Martin Minow
minow@apple.com
From: HAC041@DJUKFA11.BITNET (Konrad Hinsen)
Newsgroups: comp.sys.mac.programmer
Subject: Unix-like environment
Date: 21 Jan 93 16:27:16 GMT
Organization: Forschungszentrum Juelich

I am contemplating to get involved in a software project aimed at several
machines, including Macs. My preferred work environment however is Unix,
mainly due to Emacs and lots of handy utilities. Since I know next to
nothing about Mac development tools, I would like to get some information
about the following topics:

1) Unix-like tools
   Are Emacs and the standard Unix-tools available for the Mac? If yes,
   where can they be obtained?

2) A/UX
   Is it a realistic proposition to use A/UX as a development platform
   for 'standard' Mac systems? Apple claims that normal Mac applications
   can be used under A/UX, but how does it work out in practice?
   Are Emacs and the other GNU utilities available for A/UX, or has
   FSF's boycot against Apple prevented that?

Any help, including pointers to other information sources, is
greatly appreciated.

Konrad Hinsen (hac041@zam001.zam.kfa-juelich.de)
From: sgl1@quads.uchicago.edu (steven gregory lane)
Newsgroups: comp.sys.mac.programmer
Subject: Custom defProc questions
Date: 25 Jan 93 21:43:10 GMT
Reply-To: sgl1@midway.uchicago.edu
Organization: University of Chicago


	I've been encountering some problems with various custom 
definition procedures. I'd love to hear from anyone who may have 
experienced similar difficulties, or who has any explanation for some 
of the strange behavior I've encountered.
	My first problem occurred while I was trying to build a custom 
CDEF under Think C 5.0x. I was using a trick culled from the Think 
Reference which allows me to keep the CDEF code in my main 
segment by packaging a JMP instruction, together with the 
procedure's address, and putting the resulting value into the control's 
contrlDefProc field ( Think Ref 1.0 under "Custom Menus" ). The 
problem is that, when I use this scheme, the CDEF never receives the 
"initCntrl" message, which I use to initialize handles to various 
regions of the control. The first message received is always 
"drawCntrl," which tries to operate on uninitialized handles, and 
crashes messily.
	BUT -- if I build the CDEF in a separate file, compile it as a CODE 
resource, install it in the project's resource file and set my CNTL 
resource's procID accordingly . . . it all works fine. Anyone know why 
the initCntrl message isn't getting sent when the code's in my 
program's main segment?
	Here's another one. I was working with a popup Menu, which 
had a custom MDEF attached. I had the MDEF installed in the main 
segment, as above. In the course of debugging I noticed the MDEF 
was receiving some messages that weren't documented. The new 
"Toolbox Essentials" book documents messages 0-3 for MDEFs. I was 
getting 4s and 5s, sometimes two or three in a row. I looked in the 
header files, and they were defined there -- I believe they were a 
couple of "calcRgn" messages of the sort found in CDEFs. But no 
documentation anywhere. Can anyone tell me why my MDEF 
received these, and what I do with em?
	A last question on popup menus; the menu in question displays 
a grid of icons from which the user can choose. Ideally the menu 
would display the currently selected icon when the menu is sitting 
there inactive, in the same way it would display the current text 
item. Nothing in the Apple documentation seems to cover this. Any 
ideas?
Newsgroups: comp.sys.mac.programmer