HDTenEightyP/NetNews huggingface dataset:
From: smsilver@coos.dartmouth.edu (Scott M. Silver)
Newsgroups: comp.sys.mac.programmer
Subject: Reading Resources II
Summary: How to correctly read resources and use them
Keywords: resources reading mac pascal
Date: 22 Dec 92 19:07:58 GMT
Organization: Dartmouth College, Hanover, NH

I am trying to make my own simple resource and read it in (correctly).  The resource is simply created by typing in the ascii region when creating a new resource.  The following code works for printing out the resource, but it really doesn't properly assign the correct characters to the variable ch.

{PrintString:  Res is handle to the resource.  Size is the size of the
resource}
{Takes a handle to a resource and prints it out to the text window in Think
Pascal}
 procedure PrintString (res: Handle;
       size: integer);

  var
   index: integer;
   ch: char;
   scratch: Ptr;

 begin
  Hlock(res);
  for index := 0 to size - 1 do
   begin
    Scratch := Ptr(LongInt(Res^) + longint(index) - longint(1));
    BlockMove(Scratch, @ch, 2);
    write(ch);
    if index mod 32 = 0 then
     writeln;
   end;
  HUnlock(res);
 end;

This as it says justs prints out the resource to the text window in Think Pascal.  I think my problem is a conceptual one having to do with memory and not Resources.  Any help would be appreciated, and thank you in advance.  

Scott


"If you met two guys named Hambone and Flippy, which do you think would like dolphins more?  You'd probably say Flippy.  You'd be wrong though, it's Hambone."
Newsgroups: comp.sys.mac.programmer
From: wdh@netcom.com (Bill Hofmann)
Subject: Re: Drag & Drop on an alias? What's missing?
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Distribution: comp
Date: Tue, 22 Dec 1992 17:35:30 GMT

fixer@faxcsl.dcrt.nih.gov (Chris Feelin' Groovy Tate) writes:
>Creating a new alias for the app seems to clear up the problem.  Rebuilding the
>desktop may have some effect, too, though don't quote me on that.  :-)
The effect I've noticed is that rebuilding the desktop destroys the drag-
and-drop ability.  Since I move my HD between machines, I can't really put]
things on the desktop in useful places, so I have a "Desk" folder, and when
I have to rebuild, I have to find all the alias owners and rebuild each
app alias.

-Bill
Newsgroups: comp.sys.mac.programmer
From: Dmitry Boldyrev <dmitry@chemistry.chem.utah.edu>
Subject: PLEASE, README!
Organization: University of Utah
X-Useragent: Nuntius v1.0
Date: Wed, 30 Dec 92 02:06:31 GMT

Does anyone know the answer on my question ?
Please, help!
I've asked about Color QuickDraw..
Please, read : title "Strange things with Color Quick Draw" ..
It's very important for me now..
THANK YOU!
Newsgroups: comp.sys.mac.programmer
From: art@leis.base.bellcore.com (A. Zysk)
Subject: One binary for all Macs (even 128K)
Reply-To: art@leis.base.bellcore.com (A. Zysk)
Organization: ZEI Software
Date: Tue, 29 Dec 92 20:13:04 GMT

This is a two part question concerning the mant versions of
MACS out there.  I've divided the questions into an ENGINEERING
section and a MARKETING section.  Any response to any question
is appreciated.


ENGINEERING SECTION
===================

Is there anyone else out there who is trying to keep
thier applications *absolutely* portable to ALL Macs
including the Original 1984 128K Mac?

I am developing on higher powered Macs and cross testing on the
128K.

As a second phase, I plan to obtain or develop a library of tools
that selectivly enable or disable certain features either available
or not available on a particular Mac.

A good example is the pulldown menu.  On 128K Macs, you can only
append a limited number of menu items to a pulldown menu.  This is because
the auto scrolling feature is not available.

I know that producing such a library will be very painful, but I anticipate
the results will be well worth it.  Do any comprehensive texts exist
on this subject?

MARKETING SECTION
=================

Given each type of Mac,

	How many units of each have been manufactured?

	By country, per type of MAC, how many units are still in use?

        What's the breakdown, in as much detail as possible, of
	what they are being used for.

- A. Zysk
  ZEI Software
  art@leis.base.bellcore.com
From: brunner@crchh447.bnr.ca (James Brunner)
Newsgroups: comp.sys.mac.programmer
Subject: Displaying a picture.  Question.
Date: 22 Dec 92 22:37:22 GMT
Reply-To: brunner@crchh447.bnr.ca (James Brunner)
Organization: Bell-Northern Research, Richardson, Tx

Greetings, I wish to display a small picture in a dialog box.  I have an
8-bit grayscale pict.  How do I display this if the monitor is set to 1-bit?
I know that QuickTime can do this, but I can't always be sure that QuickTime
is installed.  Do I need two PICTs in the resource fork and then I have to
pick the PICT based on bit depth?  I guess I need a user-item in my dialog
box for this?  How do I get the screen depth of the screen where my dialog
is displayed?  Is there a better way?
-- 
---------------------------------------------------------------------------
Jim Brunner - (brunner@bnr.ca)
All opinions are my own and have nothing whatsoever to do with BNR, NT,
NTI, Bell Canada, or any of the BCE corporations or affiliates.
Newsgroups: comp.sys.mac.programmer
From: C1876@UMSLVMA.UMSL.EDU
Newsgroups: comp.sys.mac.programmer
Subject: mailing lists
Date: 2 Jan 1993 11:26:21 -0600
Organization: UTexas Mail-to-News Gateway
NNTP-Posting-Host: cs.utexas.edu

I am a developer of macintosh software and I am interested in obtaining
a mailing list of user groups, resellers, and publishers to use in
marketing.  Is it possible to obtain such information on the InterNet.
Any information on how I could obtain such mailing lists (from the
internet or elsewhere) would be greatly appreciated.  I would be most
greteful if someone could send me a list.  I am interested in small and
large resellers that carry software in the following areas:

1) Education (math)
2) Graphic design tools
3) Programming tools (languages, etc)

I am also interested in publishers that specialize in one or more of the
above three areas.

Thanks in advance,

Terry Koyn
Newsgroups: comp.sys.mac.programmer
From: gg4921s@acad.drake.edu
Subject: MicroSoft Word 4.0 Binary File Spec!!
Organization: Drake University, Des Moines, Iowa, USA
Date: Mon, 21 Dec 1992 20:34:36 GMT

  I am looking at MicroSoft Word's 4.0 Binary File Spec for the macintosh.
In it they talk about 4 byte integers:  if I print one of these 4 byte integers
it looks like ( in decimal ): 32 32 32 1  
I can translate this to binary, no problem, but have two questions:
   1.     what coding is being used, ie.  BCD or 2's complement or unsigned
        integer?
   2.   what order are these bytes, most significant byte on left?
  Anyone with knowledge of Word Binary File format out there?
Thanks Ahead, 
Gordon Graber, Academic computing, Drake University, Des Moines,IA
From: vollrath@vax.oxford.ac.uk
Newsgroups: comp.sys.mac.programmer
Subject: Re: Resource help?
Date: 23 Dec 92 17:16:44 GMT
Organization: Oxford University VAX 6620

In article <1h7hg5INNhmr@gap.caltech.edu>, chriswd@cco.caltech.edu (Chris Michael Ward) writes:
> I was wondering if someone could help me out.  As a newtimer to Macintosh
> programming, I am in the process of learning how to use resources.  I'm
> trying to get the data from a simple 'STR#' resource, but it doesn't
> seem to be working correctly.  
> 
> Should I do something like this:?
> 
> aHandle = GetResource ('STR#', RES_ID);
> the_string = (char *) aHandle;
> strncpy (temp_string, the_string, 2);
> num_words = (int) temp_string;
> ... then proceed to get the character data as the_string[x]?
> 
> I'm sure I'm probably approaching this problem incorrectly.  Any advice
> would be greatly appreciated.  (I can't seem to find any more info in
> Inside Macintosh)
> 
> Thank you greatly!
> 

> - Chris

Actually, string resources are easier to handle than this. The routines
you want are GetIndString (for STR# resources, IM I-468), and GetString
(for STR resources, ibid). Here are the pascal definitions:
function GetString(stringID:Integer):StringHandle;
procedure GetIndString(var theString:Str255; strListID:Integer;
    index:Integer);

My C is too rusty to fill in the pascal converion stuff.

Alun ap Rhisiart
Animal Behaviour Research Group
Oxford University
From: ksand@apple.com (Kent Sandvik )
Newsgroups: comp.sys.mac.programmer
Subject: Re: Sound Manager Code Samples
Date: 22 Dec 92 03:21:36 GMT
Followup-To: comp.sys.mac.programmer
Organization: (Evil Eye Creature from Mars, Inc.)

In article <1gsig8INNe1@rave.larc.nasa.gov>, wjb@cscsun2.larc.nasa.gov
(William J. Bene) wrote:
> 
> Does anyone know where I can get code samples/code fragments for the Sound 
> Manager?  The Inside Mac manuals haven't been too helpful.

You could start with the DTS SoundApp sample code, available on 
Developer CDs and on ftp.apple.com.

Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.		
"Don't just do something!  Stand there!"  -- Mystery Science Theater 3000
Newsgroups: comp.sys.mac.programmer
From: zobkiw@world.std.com (Joe Zobkiw)
Subject: Finding the newest resources (?)
Organization: The World Public Access UNIX, Brookline, MA
Date: Wed, 30 Dec 1992 12:20:34 GMT

I am keeping a very small set of resources in my applications datafile.
I need to find out which resources are the newest without keeping an
audit trail of all my AddResource calls. I assume I can read the Resource
Map directly to figure this out, or can I? I forsee a routine something like:

Handle MyGetRes(short id, ResType type, long* rank);

Where rank returns a value, 1 being the latest resource added to the file,
n being the "oldest" resource in the file. 

My questions are, is this a valid solution? What happens if I delete a
resource in the middle somewhere, does the next added resource take its
old position and thus screw up my theory? Any better ideas?

Thanks in advance.


-- 
-------------------------------------------------------------
joe zobkiw         zobkiw@world.std.com        aol: aflzobkiw

macintosh.midi.synthesis.c.oop.asm.communications.graphics...
From: REEKES@applelink.apple.com (Jim Reekes)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Sound Manager usage on SE
Date: 31 Dec 92 21:25:51 GMT
Followup-To: comp.sys.mac.programmer
Organization: Apple Computer, Inc.

In article <1992Dec29.182159.8272@rtsg.mot.com>, wolfmc@rtsg.mot.com
(Michael Wolf) wrote:
> 
> I have some sounds I want to play in an application.  Which machines can
> play sounds synchronously?
> 
> On my SE if I call PlaySnd, pass it a channel created via SndNewChannel,
> and I tell PlaySnd to play it asynchronously (pass it false in the async
> parameter), I get one sound to play, there after every call to PlaySnd
> will not play a sound.
> 
> Also, why is the async flag in PlaySnd opposite of what it would be
> intuitive to its name, ie:  if you pass true in async, the sound will be
> played synchronously.  Whose the add wizard who came up with that idea?

You're probably using system 6.0.x and are not aware of the documented bug
when using a channel more than once with SndPlay. If you read the older
documentation that I wrote in 1988, the replacement Sound Manager chapter,
you'll find this mentioned.  It's also in the SoundApp sample code from
MacDTS. This bug was fixed in System 7.0.

The asynch flag works as documented.  If it's true, then it play
asynchronously.  If it's false, then it doesn't. What "wizard" has
convinced you otherwise?

-----------------------------------------------------------------------
Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
                             |          Sound Manager Expert
Apple Computer, Inc.         | "All opinions expressed are mine, and do
20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
Cupertino, CA 95014          |       employer, Apple Computer Inc."
From: freek@phil.ruu.nl (Freek Wiedijk)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Drag & Drop on an alias? What's missing?
Date: 25 Dec 92 17:18:52 GMT
Organization: Department of Philosophy, University of Utrecht, The Netherlands

In article <jpugh-191292124255@kip2-42.apple.com> jpugh@apple.com (Jon Pugh)
  writes:
>I've seen what I call a bug wherein drag and drop fails on aliases to
>programs on different volumes (i.e. your program is on volB and the alias
>is on the desktop of volA).

I suppose the desktop database of volA should know about the
application on volB.  Copying a document `owned' by that applicaton to
volA (and then removing it) will probably help.

Freek
--
Third theory of Phenomenal Dynamics:  The difference between
a symbol and an object is quantitative, not qualitative.
Newsgroups: comp.sys.mac.programmer
From: Dmitry Boldyrev <dmitry@chemistry.chem.utah.edu>
Subject: How to write a balloons ?
X-Xxmessage-Id: <A585EAA2B101C4C9@quadra.chem.utah.edu>
X-Xxdate: Tue, 31 Dec 91 06:36:34 GMT
Organization: University of Utah
X-Useragent: Nuntius v1.1.1d16
Date: Thu, 31 Dec 92 16:34:17 GMT

Hi Folks,
Does anyone know how to write a balloons ?
I have very strange thing with my App: When I switched on the balloons
and clicked on *Apple* Menu, I had the menu length AppleItem * 13 ..
Does anyone know how to fix it ?
Thanks in advise!
= Dmitry =
Newsgroups: comp.sys.mac.programmer
From: wysocki@netcom.com (Chris Wysocki)
Subject: Re: C preprocessor needed
Keywords: preprocessor
Organization: Connectix Corporation, San Mateo, CA
Date: Wed, 30 Dec 1992 04:40:32 GMT

In article <1hq6jmINN25q@wooster.cs.purdue.edu> benes@cs.purdue.edu (Chris
Benes) writes:

>I desperately need a C preprocessor that will work under Think C 5.0.2.
>...
>Does anyone know where I can get a public domain preprocessor or
>where I can purchase one?

gcc includes a C preprocessor which you should be able to port to the
Mac without too much difficulty.  There have also been a couple of C
preprocessors posted to comp.sources.misc within the past eight years
or so, although none of them are ANSI-compliant, if that's an issue
for you.

Chris.
-- 
------------------------------------------------------------------------------
Chris Wysocki                                     Internet: wysocki@netcom.com
Software Engineer                                   America Online: AFA ChrisW
Connectix Corporation                                   CompuServe: 72010,1140
From: iscjcw@uccvma.ucop.edu (Jerry Wilcox)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Programming Group and the 32k TextEdit barrier
Followup-To: comp.sys.mac.programmer
Date: 23 Dec 1992 17:49:22 GMT
Organization: University of California, Office of the President
Distribution: world
NNTP-Posting-Host: ajax.ucop.edu

In article <1992Dec22.204923.28047@kth.se>, d88-jwa@hemul.nada.kth.se (Jon
Wtte) wrote:
> 
> I wouldn't touch TopSoft with a stick.
> 
> I have publicly criticized TopSoft for certain specific
> reasons, but never gotten any reply.
> 
> Stay away from TopSoft, at least as long as it sounds more like
> a megalomaniac pushing poor beginners around than a collection
> of open minds doing things for fun and learning.
> 
I have written Jon off-line as to why he has this opinion which is so
totally divergent from mine. He is obviously entitled to it, as I am to
mine, but I have not seen any "megalomaniac pushing poor beginners around"
behaviour and I certainly wouldn't tolerate being treated that way
(although I'm definitely NOT a beginner). I don't want to start a flamewar
over this issue, but I do want to clearly state that my experience working
with TopSoft is 180 degrees from what Jon is saying. I have not seen any of
Jon's "public criticisms", but certainly could have missed them.

-----------
Jerry Wilcox - iscjcw@uccvma.ucop.edu
All opinions expressed are MINE -- I'd have a different job if the
University wanted me to speak for it.
From: thompson_p@kosmos.wcc.govt.nz
Newsgroups: comp.sys.mac.programmer
Subject: THINK pascal
Date: 29 Dec 1992 19:34:57 GMT
Organization: Wellington City Council (Public Access), Wgtn, Nz
Reply-To: thompson_p@kosmos.wcc.govt.nz
NNTP-Posting-Host: kosmos.wcc.govt.nz

I'm using an old version of Think pascal, (Version 2.03) and I want to use 
certian toolbox calls that became available with system seven. Do I have to
upgrade to version 4, (costly at 175$ NZ) or can I get the libraries from
somewhere?

Cheers, Paul
Newsgroups: comp.sys.mac.programmer
From: oster@well.sf.ca.us (David Phillip Oster)
Subject: Re: Scrollbars with more than 32000 lines?
Organization: Whole Earth 'Lectronic Link
Date: Wed, 23 Dec 1992 07:27:36 GMT

In one of my products I implemented a data type I called an 
ExtendedControlHandle : it was a handle to a record that had long
min, max, values, and a scale factor and a control handle. I wrote 
GetExCtlValue(), GetExCtlMin(), and GetExCtlMax(), and the corresponding
set functions. These stored the actual value in the ExCtlRec, scaled it
by the scale factor, and put the result into the ownded control. The
remaining thing you need is ResolveExCtl(), which you call after the user
drags the thumb of the control using the mouse, which reads the current
control value, scales it, and stores it in the value field of the extended
control record. The whole thing is about one page of code.
From: ksand@apple.com (Kent Sandvik )
Newsgroups: comp.sys.mac.programmer
Subject: Re: ETO#9 MacApp won't build - C - Fatal Error : 407
Date: 30 Dec 92 21:51:53 GMT
Followup-To: comp.sys.mac.programmer
Organization: (Evil Eye Creature from Mars, Inc.)

In article <1992Dec29.234245.13507@reed.edu>, bowman@reed.edu (Mr. Stress
Tensor) wrote:
> In article <1992Dec29.225510.11821@verity.com> anders@verity.com (Anders Wallgren) writes:
> >In article <1992Dec29.211429.28535@cs.tulane.edu> Jeff E Mandel,
> >mandel@tmc.tulane.edu writes:
> >># C - Fatal Error : 407
> >># could not proceed, BAD VERSION NUMBER in Dump file
> >># No error (OS error 0)
> >You should delete all dump files created by previous versions of
> >the compiler and let the new compiler regenerate them.
> 
> Unless I'm mistaken, all you *really* need to do is add an "-e" to your
> command line.

From Cplus 411:
    -e                      # write preprocessor results to output

No, there are no magic flags to tell MPW C++ to reproduce a dump file,
unless you write a fancy dependency somewhere in the makefile. Yes,
I've pointed this out to the compiler people, because during the N versions
of MacApp 3.0 alpha/beta versions this was a known gotcha, and it
would be nice if the compiler either warned about this, or generated
a new dump file using a special flag.

Anders is right, delete any folders inside your "{MALoadFiles}" folder
and start afresh. In addition, if any of you see cases where the compiler
barfs in Geometry.h, this is another possible example of where the dump
files
needs to be re-generated.

Kent
-------------------
Kent Sandvik (UUCP: ....!apple!ksand; INTERNET: ksand@apple.com)
DISCLAIMER: Private activities on the Net.		
"Don't just do something!  Stand there!"  -- Mystery Science Theater 3000
From: brad@tazboy.jpl.nasa.gov (Brad Pickering)
Subject: Re: MacMINIX
Organization: Jet Propulsion Laboratory, Pasadena, CA
Date: Thu, 31 Dec 1992 18:09:53 GMT

In article <C04tHD.13I@iapa.uucp%mailhost.ecn.uoknor.edu> ctrbdo@iapa.uucp%mailhost.ecn.uoknor.edu (bryan d oakley) writes:

   Newsgroups: comp.sys.mac.programmer
Path: elroy.jpl.nasa.gov!usc!cs.utexas.edu!convex!constellation!iapa!ctrbdo
   From: ctrbdo@iapa.uucp%mailhost.ecn.uoknor.edu (bryan d oakley)
   Organization: FAA / Mike Monroney Aeronautical Center
   Date: Thu, 31 Dec 1992 16:22:24 GMT
   Lines: 7

   I've seen several references of late to MacMINIX.  Anyone care to
   describe the product? 

MacMINIX is the Mac version of MINIX. MINIX is a unix like operating
system that comes with source code so you can see how things are done
and change them if you like.  It is often used in operating systems
classes to give a hands on feel for OS programming.  MINIX is
discussed in comp.os.minix.  Read this group for more details.

Brad Pickering
Newsgroups: comp.sys.mac.programmer
From: howard@netcom.com (Howard Berkey)
Subject: Re: Best Mac value of all time
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
Date: Sun, 3 Jan 1993 00:01:52 GMT

In article <1993Jan2.140733.6474@netcom.com> jimlynch@netcom.com (Jim Lynch) writes:
>By nominating the SE/30 and then saying 'no used machines', you have thrown out
>your own nomination. As far as I know, SE/30s are discontinued (but they abound
>in the used market for bargain basement prices, like you say.)



Nah, I was talking about the best new machine price/performance value,
including upgrades.  Presumably one could purchase an SE/30 new at one
time :)

-Howard

-- 
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Howard Berkey                       			   howard@netcom.com
Did you hear about the dyslexic devil worshipper?
He sold his soul to Santa.				-Herb Caen
... .. ...   ... .. ...   ... .. ...    ... .. ...   ... .. ...   ... .. ...
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Subject: Re: An Euphemism (was Re: Uniquely identifying a Mac? How?)
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Tue, 29 Dec 1992 23:38:08 GMT

In <1hn5aoINNvb@iraul1.ira.uka.de> s_titz@ira.uka.de (Olaf Titz) writes:

>the developers didn't know. The best piracy protection is IMHO good
>documentation, support and reasonable pricing.

Actually, no. I know of several places that would have bought
just one AutoCad and run it on several machines, had that been
possible. And that's AutoCads with certain expensive add-ons...

The best copy protection is free software, or total-site licenses.

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --

 -- I don't fear death, it's dying that scares me.
From: guxu@physics.ubc.ca (Guang Xu)
Newsgroups: comp.sys.mac.programmer
Subject: What does TRY/CATCH/ENDTRY do?
Date: 22 Dec 1992 22:14:26 GMT
Organization: The University of British Columbia
Distribution: world
NNTP-Posting-Host: physics.ubc.ca

The following code is found in Think C class Library:
TRY{
    .......
    }
CATCH{
     .....
    }
END TRY
What do they mean?