HDTenEightyP/NetNews huggingface dataset:
From: matthew@wavefront.wti.com (Matthew Coohill)
Newsgroups: comp.sys.mac.programmer
Subject: HELP PLEASE!!!
Date: 5 Oct 92 23:17:25 GMT
Article-I.D.: wavefron.603
Organization: Wavefront Technologies Inc, Santa Barbara, CA
X-Disclaimer: Not a spokesperson for Wavefront Technologies, Inc.


	Howdy!

	I am having problems in several areas and decided to let experts
  have a shot at handling them.

	For one, I work for a company with alot of of workstations.  We would
  like to take one of the RGBs from a workstation and hook it into a Mac for
  24-bit color.  Does anyone know of any cards for the Mac (IIfx and/or IIci)
  that will give you 24-bit on an RGB monitor (i.e., SGI, SUN, TEK, HP, etc)?

	Secondly, I have CD-ROM drives for Sun and SGI... can I use them on
  my Mac (IIsi)?  How do I hook them up?  I have an external APS drive that
  has SCSI out and I think I can chain it, but do the new SGI drives have
  a format different than the Mac?  Huh?

	Lastly/Thirdly, I am trying (desperately) to get Eudora to work on our
  Mac(s).  I am experimenting with a Classic (6.0.7), a Cayman Gatorbox CS, and
  a SUN Sparc (as the server).  We have POP-3 running on the Sun, we are using
  MacTCP on the Mac, but I can't seem to get the thin to work.  I start up as
  myself, type my password, it says "finding out local network information",
  finding wavefront.wti.com (Sparc Server) and then it says...

	"Server not responding.  The connections came up halfway and then
		failed"  {185082}

	If you know the answer to any of these questions, please reply VIA
  E-MAIL!!!  I am not subscribed to this discussion group.

	Mail me at...

		matthew@penguin.wti.com

	Thanks in advance!

  Matt Coohill
From: mikeh@kralizec.zeta.org.au (Michael Hore)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Shareware compilers
Date: 30 Sep 92 12:17:55 GMT
Organization: Kralizec Dialup Unix Sydney: +61-2-837-1183 V.32


Jerry Wilcox writes:

> ...
> There are a couple of others, both derivatives of NEON. One
>which I use quite a bit is Yerk, the other is Mops. Both have evolved into
>a cross between Forth and Smalltalk - they are object-oriented, and at
>least Yerk is very functional.
>

Yerk and Mops are both available for anon. ftp from oddjob.uchicago.edu.
They are both very functional, IMHO -- but then I'm the implementor of
Mops, so I'm definitely biassed :-)

-- Mike.

--------------------------------------------------------
Mike Hore        Internet:    mikeh@kralizec.zeta.org.au
From: wuertz@tik.ethz.ch (Andreas Wuertz)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Communication Toolbox
Date: 1 Oct 92 08:10:48 GMT
Organization: Federal Institute of Technology
X-Useragent: Nuntius v1.1

If you are using MPW you can call Gestalt, no matter which System you're
on; MPW has a glue that makes calls to older routines (SysEnvirons etc)
if Gestalt is not present. If you're using other environments, there is
an easy way to find out if Gestalt is present by calling
GetTrapAddress(Gestalt) and comparing it to 'unimplemented'. The exact
way is documented (with sample code) in Inside Mac VI, I think in the
Human Interface Guidelines chapter. 

Andy (wuertz@systech.tik.ethz.ch)

========================================================================
The only person who got all his work done by Friday was Robinson Crusoe.
========================================================================
Newsgroups: comp.sys.mac.programmer
From: Michael Hecht <Michael_Hecht@mac.sas.com>
Subject: Re: Parsing text files
X-Useragent: Nuntius v1.1.1d11
Date: Wed, 30 Sep 1992 16:47:29 GMT
X-Xxdate: Wed, 30 Sep 92 17:42:57 GMT
X-Xxmessage-Id: <A6EF51511201050A@studly.mac.sas.com>
Organization: SAS Institute Inc.

In article <1992Sep30.140336.3663@ucsvc.ucs.unimelb.edu.au> ,
u2005681@ucsvc.ucs.unimelb.edu.au writes:
>As part of a new application, I am trying to read a text file of 
>numbers and strings into a series of variables. The idea is to use the 
>numbers as co-efficients for a simulation and the strings as labels for 
>various graphs.

I've written a routine that imports a tab-delimited text file in which
the first record contains column names. You supply it with an FSSpec for
the text file, a STR# id containing the column names you're looking for,
and an action proc to be called for each row. It reads the data and for
each row builds a string list of column values in the order you specified
by the STR#. It then passes this info to the row action proc.

I wrote it to use the Task Manager, so all the I/O could be async and
reading/processing could take place in the background. This part could be
easily removed, or replaced with Threads, however.

If you're interested, let me know and I'll post it.

--Michael

=======================================================================
Michael P. Hecht                 | Internet:  Michael_Hecht@mac.sas.com
SAS Institute Inc.; Cary, NC USA | AppleLink: SAS.HECHT
From: creiman@netcom.com (Charles Reiman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: >moving the mouse
Date: 4 Oct 92 17:17:21 GMT
Organization: Netcom - Online Communication Services  (408 241-9760 guest)

jmk3@crux3.cit.cornell.edu (Jay Krell) writes:

>>> Jay Kreibich, moving the mouse
> 
>The IIGS Event Manager has a call FakeMouse that drivers use to move the mouse.
>Perhaps the Mac has the same.

Nope. You must muck with system globals. From memory, you must change
both MTemp and RawMouse to the coordinate you want. That should do the
trick. Note that this is dangerous, since a VBL could hit while you are
changing the variables, and the jCrsrTask will proceed to move the
pointer on its own to a strange new location.

FYI: This is based on what I know from beating up on the jCrsrTask. I
have never actually done this from an application environment.

--
Charlie Reiman             |                  creiman@netcom.com
"This week, Ross Perot guaranteed his place in the record books by playing
peek-a-boo with nearly 250 million people simultaneously."
-- 
Charlie Reiman             |                  creiman@netcom.com
"This week, Ross Perot guaranteed his place in the record books by playing
peek-a-boo with nearly 250 million people simultaneously."
Newsgroups: comp.sys.mac.programmer
From: heyes@dadev.cebaf.gov (Graham Heyes)
Subject: putting the mouse in a cage?
Organization: Continuous Electron Beam Accelerator Facility
Distribution: comp.sys.mac.programmer
Date: Wed, 30 Sep 1992 14:35:07 GMT

Two quick questions related to the mouse/pointer...

Firstly how if at all possible can the movement of the
mouse be restricted to one area of the screen, for example
restricting mouse movement to within a particular window ?

Secondly, and probably related, what confines the pointer 
to the screen? 

     I haven't seen this in any volumes of IM or anywhere
else for that matter so I'm curious as to if it is possible.

			Graham Heyes
Newsgroups: comp.sys.mac.programmer
From: gregor@oit.itd.umich.edu (Gregor Purdy)
Subject: MIDI Manager 2.0, Mac Plus and System 6.0.8: HELP!!!
Organization: University of Michigan
Date: Mon, 28 Sep 1992 20:55:35 GMT

Friends--

I have written an application using the MIDI Manager 2.0 that seems to work  
fine on my Mac IIcx running System 7.0. However, when I run it on a Mac Plus  
running System 6.0.8 (the minimum target machine), it hangs on quit.

Now, the exact place it seems to hang is in MIDISignOut(...). Strangely enough,  
even though the pointer has hung and everything, pulling out the serial cable  
connecting the machine to the MIDI keyboard allows the application to finish  
quitting. Go figure.

I need to deliver this application SOON. Does anyone out there have an  
insights?

Please email responses because I hardly ever read this group. If enough people  
are interested, I'll summarize.

--Gregor N. Purdy
Instructional Software Developer
The University of Michigan
gregor@umich.edu
Newsgroups: comp.sys.mac.programmer
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Subject: Re: Screen Capture prob.  Please HELP!!!!!!
Organization: Kalamazoo College
Date: Wed, 30 Sep 1992 17:25:44 GMT

mgeorgy@vmsclst1.sc.csupomona.edu writes:
>Jamie R. McCarthy writes:
>> mgeorgy@vmsclst1.sc.csupomona.edu writes:
>>>...what do I need to add to my
>>>program so that I can capture the screen image...?
>> 
>> Put a
>> WaitNextEvent loop in instead of a "while(!Button());" loop, and you
>> should handle all FKEYs properly.
>>
>I am using an old
>version of the Meridian Ada Compiler which does not support system 7.  Is there
>another way of doing this with pre-system 7 routines???

WaitNextEvent is there in system 6.  If your compiler doesn't recognize
WNE, try using GetNextEvent and SystemTask.  If it doesn't recognize
_those_, either you haven't told it where to look for them, or it's not
really a Macintosh compiler.  :-)

Someone else suggested using Flash-It, a commercial product that does
something similar to cmd-shift-3.  While I've never seen it, I would
suggest that it also will probably not work unless you put WNE or GNE in
your loop.
-- 
 Jamie McCarthy      Internet: k044477@kzoo.edu      AppleLink: j.mccarthy
 "I don't think we should have to have them wandering the streets
  frightening women and people."                            - Pat Buchanan
From: chuck@gte.com (Chuck Hoffman)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Screen Capture prob.  Please HELP!!!!!!
Date: 30 Sep 92 16:21:18 GMT
Followup-To: comp.sys.mac.programmer
Organization: GTE Laboratories

In article <1992Sep30.013421.1@vmsclst1.sc.csupomona.edu>,
mgeorgy@vmsclst1.sc.csupomona.edu wrote:
> 
[stuff left out]
> my instructor would like
> a print out of what I have on the screen

Try Flash-It to capture the screen image.  It is available at many ftp
sites, or you can get it directly from its author, whose address is:

   Nobu Toge
   P.O. Box 7114
   Menlo Park, CA 94026, U.S.A.

I've used Flash-It a lot for tutorials.

Chuck Hoffman
chuck@gte.com
GTE Laboratories, Waltham, Massachusetts, USA
(617) 466-2131
=====================================
I'm not sure why we're here, but I am sure that while we're here we're
supposed to help each other.
=====================================
From: urlichs@smurf.sub.org (Matthias Urlichs)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Animated Cursors...
Date: 29 Sep 1992 23:57:07 +0100
Organization: University of Karlsruhe, FRG
NNTP-Posting-Host: 127.0.0.1

In comp.sys.mac.programmer, article <38774@unix.SRI.COM>,
  mxmora@unix.SRI.COM (Matt Mora) writes:
> 
> The key is to have the vbl task check a counter that the program increments.
> The vbl would then show the true performance. And on the occasion that
> the program gets stuck in an endless loop, the vbl could detect that
> and either trigger a fail routine or jump to it.
> 
I don't think that jumping out of a VBL or quitting an application from
under it would be that good an idea. Memory may be in an inconsistent state, 
the interrupt level is not zero, and the VBL queue is marked busy. Undoing
all of this manually is a big compatibility risk.

If your application hangs, it's a bug. I respectfully suggest that you debug
your applications before shipping them to customers.  ;-)

-- 
Bradley's Bromide:
        If computers get too powerful, we can organize them into a
        committee -- that will do them in.
-- 
Matthias Urlichs  --  urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de   /(o\
Humboldtstrasse 7 -- 7500 Karlsruhe 1 -- Germany  --  +49-721-9612521     \o)/
From: pollansw@cse.fau.edu (Warren Pollans)
Newsgroups: comp.sys.mac.programmer
Subject: ThinkC on a PC?
Date: 5 Oct 92 21:38:45 GMT
Organization: Florida Atlantic University, Boca Raton, FL, USA

I may have to do some C programming on a PC (A whizzed up 486 -
whatever that means).  I'm used to ThinkC.  Is there an environment
on the PC that has a similar feel?  This will be (should be)
ordinary C programming - no machine dependent tricks (I hope).  Any
recommendations for a C compiler/debugger/etc?


Thanks,

Warren

(pollansw@cse.fau.edu)
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Sound Manager Phooey!
Date: 6 Oct 92 16:29:21 +1300
Organization: University of Waikato, Hamilton, New Zealand

In article <1992Oct5.130914.28967@hobbes.kzoo.edu>, k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
>
> Another difference is that the LC doesn't support the 4-channel
> wavetable mode, which is part of the ASC.

The System 7 Sound Manager makes up for this. I know, I've written some
code that uses the wave table synthesizer, worked fine on my LC running
System 7, sounded really terrible (low, groaning noises instead of tuneful
multipart harmonies) on an LC running 6.0.7.

>>* the System 6.0.7 and 6.0.6 sound managers have MAJOR bugs, especially when
>>dealing with the LC.
>
> Well, I don't know about the LC in particular, but those sound managers
> in general are a _lot_ more trustworthy than in previous versions.

I know of one major snag with the 6.0.7 Sound Manager. To start off a group
of channels in sync, I use the trick of sending a pauseCmd (with
SndDoImmediate) to each of the channels, then I load up each queue with a few
commands (sent with SndDoCommand), and finally resume them all with a resumeCmd
(with SndDoImmediate). This worked fine on various machines with System 7,
then I had a report of my code crashing a IIcx running 6.0.7. I had a brief
chance to check it myself, and discovered that it was dying in the resume loop.

Idea: perhaps it has something to do with spurious invocation of my callback
routine. I recall Jim Reekes mentioning that this was possible, though I
don't recall what the precise conditions were.

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
From: Meessen@slig.ucl.ac.be (Christophe Meessen)
Newsgroups: comp.sys.mac.programmer
Subject: Think C bug ?
Date: 6 Oct 92 07:58:07 GMT
Followup-To: comp.sys.mac.programmer
Organization: Universite Catholique de Louvain (Belgium)


Teaching C to a friend I fall on the following problem:

If I compile the following program, everything is right:

main() {
   printf( "Hello world !" );
}


The following program worked also fine :

main() {
   short i = 3;

   printf( "a number : %d ! ", i );

}

Ok, nothing new here !

But now, when I write the following program the compilation stops and tell
me that there is a syntax error :

main() {
   short i = 3;

   printf( "a number : %d ! \n", i );

   print( "Hello world !" );  <== Syntax error in that line !!!!

}

It was unexpected and made a bad impression on my friend.

The problem seems related to printf signature (or prototype).

If I change the "wrong" line to 

   print( "Hello world !", i );

Every thing works fine !!

Very strange, isn't it ?

Is this standard C or Think C bug ?
Any comment on that ?

Think C used is 5.0.x (I dont remember last number)

Bien cordialement,

                           Christophe MEESSEN
From: mikeh@kralizec.zeta.org.au (Michael Hore)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Formatting a disk in the background
Date: 30 Sep 92 09:27:47 GMT
Organization: Kralizec Dialup Unix Sydney: +61-2-837-1183 V.32


Quinn "The Eskimo!" writes:

>btw Does anyone know why the disk init package doesn't display
>a filler bar telling you how far it's got?  It seems like a user
>interface faux pas to me.

I'd agree with that.  As far as I remember the user interface to the
DIP has hardly changed since System 1!  Of course the rest of the
package has evolved to handle HD disks, mapping out of bad blocks
under Sys 7, and so on, but not the interface.

I think it was probably just so low on the priority list that it
sort of dropped off the bottom without anyone noticing :-)

-- Mike.

--------------------------------------------------------
Mike Hore        Internet:    mikeh@kralizec.zeta.org.au
Newsgroups: comp.sys.mac.programmer
From: felciano@summit.stanford.edu (Ramon M. Felciano)
Subject: Re: Q: Deep dark MDEF menu manager debugging...
X-Posted-From: InterNews1.0a5@leland.stanford.edu
Organization: Stanford University Medical Media and Information 
 Technologies
Date: Sat, 3 Oct 92 22:56:02 GMT
Xdisclaimer: No attempt was made to authenticate the sender's name.


Well, I've narrowed down the bug some more -- maybe this will sound
more familiar to you all now...

As far as I can tell, it has to do with the optimizations we made
together. In particular, we changed my menu scanning routine to return
a pointer to the itemString, rather than a copy of the string itself.
The problem I'm having is that I get a NIL Reference error in my
Runtime.lib in my DrawItem routine right when I want to draw the string
(everything before hand -- drawing the Icon, checmark, etc., works
fine) >> when I move into the menu <<. That is, when I move over the
hierarchical item, the hiermenu appears fine. But as soon as I move
into it, boom! As far as I can tell, the errors when I do the
DrawString(pItemString^).

Normally, I'd say my pointer had become invalid. But it points directly
into the menuHandle, which I lock at way at the top of my MDEF (and
reset just before leaving)!

Some tests and symptoms
=======================
o  This problem affects hierarchical menus only. It doesn't matter
whether
   the parent menu is standard or custom.
o  When running from my MDEF Tester application (i.e. off of a the
compiled
   MDEF), the menu simply doesn't appear.
o  If I comment out a big block of code in the middle of my DrawOneItem
   routine, >>it works<<! It seems like the DrawString(pItemString^) is
   having a hard time dereferencing so far back! Does this make sense?
o  If I insert the following line at the TOP of my DrawOneItem
procedure,
   everything works fine:

       IF pItemString <> NIL THEN
           itemString := pItemString^;
 
   (where itemString is a local variable of type str255), everything
   works fine. I looks like if I dereference pItemString early enough,
   including with a writeln, everything is cool.


Any help would be >greatly< appreciated...

Thanks!

Ramon

+----------------------------------------------------------------+
| Ramon M. Felciano                felciano@summit.stanford.edu  |
| Associate Director, SUMMIT       (415) 723-9688                |
| Stanford University Medical Media and Information Technologies |
+----------------------------------------------------------------+
Newsgroups: comp.sys.mac.programmer
Subject: Programming a text parser for a game....
From: psweeney@miavx1.acs.muohio.edu
Date: 5 Oct 92 09:43:58 -0500
Organization: Miami University Academic Computer Service"

Hi there.  I'm thinking of programming a simple
text adventure game, a la Zork, but with a few other
windows like status and maybe a view of each room.

How would I go about coding the text parser?  Do I just 
handle a bunch of keyUp events?  Is there some sort of
equivalent to scanf() or printf() in the ToolBox?
It seems like if I keep sensing for keystrokes, that could
get unwieldy.  On the other hand, I don't see any other way
around it.

Any response is welcome.

Peter Sweeney
psweeney@miavx1.acs.muohio.edu

Newsgroups: comp.sys.mac.programmer
From: rhorn@csws7.ic.sunysb.edu (Robert Horn)
Subject: Re: General Help Needed (THINK C)
Organization: State University of New York at Stony Brook
Distribution: na
Date: Fri, 2 Oct 1992 17:42:41 GMT

In article <BvGK8L.70H@cs.dal.ca> powell@ug.cs.dal.ca (Joel E Powell) writes:
>I'm just starting to program the Macintosh, and have THINK C 5.0.
>I already know C, but I need help on the Mac specific stuff.
>I've heard (and it's recommended in the THINK C manual) that I
>basically NEED Inside Macintosh by Addison Wesley.  However, many
>other people have said that it's a bunch of really technical mumbo-
>jumbo that I won't understand really well.  The manual also suggests
>a couple of other books like the Macintosh C Primer, and such books.
>
>Can people please give me a few recommendations on getting started with
>programming Mac applications?  Are these books any good (or at least
>worth their money)?  Any suggestions appreciated.

Not only is Inside Macintosh a bunch of really technical mumbo jumbo
that you won't understand very really well, but you do need it,
although there is a new series of Inside Mac coming out which is
allegedly somewhat better (I haven't seen them) in that it is no longer
organized chronologicly. You'll find that you can go quite a long way
with the first two volumes of Inside Mac and the Macintosh C
Programming Primer (2nd edition), since when you're just starting you
don't really want to have to deal with Color, HFS, System 7 and all
that until you are comfortable with windows and menus and TextEdit and
dialogs and resources and thousands of other little things.

Cheers
Robb

-- 
rhorn@ic.sunysb.edu           Never choose a college because it has a duckpond.
Newsgroups: comp.sys.mac.programmer
From: fixer@faxcsl.dcrt.nih.gov (Christopher Tate)
Subject: Centering dialogs
Reply-To: fixer@faxcsl.dcrt.nih.gov
Organization: Computer Systems Laboratory, DCRT, NIH
Date: Thu, 1 Oct 1992 14:07:18 GMT

Weird problems.

I have written a routine to put a dialog or alert in the "approved" position
on the screen, i.e. centered horizontally, with 1/3 of the remaining vertical
gray space above the dialog and 2/3 below.

The routine works as follows (in C):

     DialogTHndl  dtHand;
     DialogPtr    theDialog;

     dtHand = GetResource('DLOG', DLOG_ID);
     CenterDialog(dtHand);                // change (**dtHand).boundsRect
     theDialog = GetNewDialog(DLOG_ID, 0L, (WindowPtr) -1);
     ...
     DisposDialog(theDialog);
     ReleaseResource(dtHand);

The weird thing is that I have to explicitly call ReleaseResource(dtHand) in
order to free the DLOG template from memory.  If I don't, it stays around
*and gets trashed*.  If I use SS in MacsBug to trap where the boundsRect is
getting changed, it's somewhere deep inside _SIntRemove.  Does anybody have
any idea why random memory is getting hosed?

(Actually, GetNewDialog() itself is trashing the DLOG template's boundsRect,
but not before it copies it out to the new dialog record.)

I'm not currently setting the DLOG resource's resChanged bit, because I don't
want to write it out at the new position.  Is this confusing the machine
somehow?

-- Christopher Tate
Newsgroups: comp.sys.mac.programmer
From: sainaney@unixg.ubc.ca (Narayan R. Sainaney)
Subject: Re: How do I draw icl8's?
Summary: Plotting Icons (the System 7 way) 
Organization: University of British Columbia, Vancouver, B.C., Canada
Date: Thu, 1 Oct 1992 00:24:40 GMT

In article <8352@dirac.physics.purdue.edu> sho@bohr.physics.purdue.edu (Sho Kuwamoto) writes:
>IM VI gives the following useful info:
>    [PlotIcon and PlotCIcon] will not draw any icons that
>    are defined by the icon resources new to system 
>    software 7.0 -- namely, the 'ics#', 'icl4', 'ics4',
>    'icl8', and 'ics8' resources.
>
>Unfortunately, IM VI does not seem to say how one goes about
>drawing these icons.  Well, how *do* I draw these types of
>icons?  Also, is there an easy way for me to hilight the
>icons in the same way that the Finder does?
>
>-Sho
>--
>sho@physics.purdue.edu

	You are in luck. I just finised working on Luanch Pad (a 
shareware app) that makes extensive use of PlotIconID which is very
well documented in APDA tech Note 306. The routine call is:

err:= PlotIconID (theRect,align,transform,theResID)

where align and transform allow you to do neat stuff like center/
left or right justify it and transfor it (launched etc etc)

The interface file is at the end of the tech note and it contains
all the values possible for align and transform (integers). The inline
function is:

function PlotIconID(theRect:Rect;align:Integer;transform:integer;
                    theResID:Integer):OsErr;
inline
 $303C,$0500,$ABC9

hope this helps. 
sainaney@unixg.ubc.ca
PS: To do a simple plot, use 0,0 for align and transform.