HDTenEightyP/NetNews huggingface dataset:
From: potts@itl.itd.umich.edu (Paul Potts)
Subject: Re: diskInserted events
Organization: Instructional Technology Laboratory, University of Michigan
Date: Wed, 15 Apr 92 14:14:03 GMT

In article <92105.142724CXT105@psuvm.psu.edu> Christopher Tate <CXT105@psuvm.psu.edu> writes:
>In article <22885@goofy.Apple.COM>, REEKES@applelink.apple.com (Jim Reekes)
>says:
>>
>>All applications should be checking for diskInserted events.
>>
>
>Be that as it may, what should my app be *doing* with them when it
>sees them?  I have yet to write an application that needed to know
>about these events, so why should I bother looking at them.

If you don't handle them, when your app is frontmost and a user inserts
a disk, nothing will happen. Even after they quit, nothing will happen -
the disk won't have been mounted, and they can't drag it into the trash
to get rid of it; they can hit "Eject," but most users will just be confused.
(At least, this is the way it used to work).

You should have a case for diskEvents in
your main event loop; it is also a good idea to add a case for handling
diskEvents to the filter procedures of any modal dialogs you use. If you
do this, then your user can insert disks even while a modal dialog is on
the screen, and still have the system recognize them.

Here is how I do it inside a dialog filter procedure:

if (GetNextEvent(diskMask, &diskEvent) == TRUE)
{
	if (HiWord(diskEvent.message) != 0) 
	{
		diskEvent.where.h =	((screenBits.bounds.right - 		
				screenBits.bounds.left)/ 2) - 
				(304 / 2);
		diskEvent.where.v = 	((screenBits.bounds.bottom - 
				screenBits.bounds.top)/ 3) 
				- (104 / 2);
		InitCursor();
		DIResult =DIBadMount(diskEvent.where, 
			diskEvent.message);
	}

}	
/* end of if GetNextEvent test for disk events */
 
(Note that this is pretty crude code and uses hard-coded values for
the dialog size).

Inside your event loop, you should have a case for a diskEvent.
If the HiWord is not equal to zero, you should call DIBadMount.
You can give it anything you like for the .where field; I put mine
in the middle of the screen. There are probably better ways; this
is pretty quick-and-dirty. If you are in the event loop in a typical
application, you won't need to call InitCursor().

If you need an example, look in the Apple Sample Code for something
like SillyBalls. I can't remember where I found the above code, but
it was probably lifted from some Apple sample code.
 



-- 
Paul Potts - potts@itl.itd.umich.edu
Un damne' descendant sans lampe,/ Au bord d'un gouffre dont l'odeur
Trahit l'humide profondeur,/ D'e'ternels escaliers sans rampe... 
   -Baudelaire on DOS/Windows programming
From: mxmora@unix.SRI.COM (Matt Mora)
Newsgroups: comp.sys.mac.programmer
Subject: Re: UPMG II
Date: 10 Apr 92 16:48:13 GMT
Organization: SRI International, Menlo Park, California

In article <1992Apr3.064129.17144@vbohub.vbo.dec.com> caruso@gbi01.enet.dec.com (Angelo Caruso) writes:

>I have heard about a Usenet Macintosh Programming Guide 2nd volume.
>Is it true ? Where is it available ? 

No. Not for a while.



Matt


-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________
Newsgroups: comp.sys.mac.programmer
From: David Murray
Subject: Job: Mac; Vancouver; BC
Summary: macintosh, programmer, job, vancouver
Keywords: macintosh, programmer, job, vancouver
Reply-To: dmurray@prodigy.bc.ca
Organization: Prodigy Technologies Corp
Date: Mon, 6 Apr 1992 18:19:22 GMT

This has been copied from can.jobs for the benifit of those who haven't
subscribed to it.

MacProgrammers

Join an elite team of programmers responsible for developing Large Corporate
Information Systems on revolutionary color Macintosh/Sparc based platforms.

Our progressive approach keeps us on the leading edge of business technology.

We offer a unique learning experience, flexible hours, and a comfortable
working environment.

Must love the macintosh.

o Req. exp.: MPW C, Lightspeed C, MacsBug, TMon, Mac Toolbox.
o Useful exp.: SQL, Sun, Unix, Large Scale Connectivity.

-
dave
dmurray@prodigy.bc.ca
fax (604) 687-1671

Newsgroups: comp.sys.mac.programmer
From: pfeifer@alw.nih.gov (John Pfeifer)
Subject: Re: Problem with THINK C 5.0.2 (long)
Organization: National Inst. of Health, DCRT, CSL
Distribution: usa
Date: Mon, 6 Apr 1992 19:38:39 GMT

Michael Harpe says:

> unsigned char rbyte;	/* should be an eight bit byte, true? */

Doesn't hafta be.

> and I want to read this byte from a buffer containing ASCII representations of
> hex bytes: AAF3D345...  I should be able to do an sscanf:
>
>	itemCount = sscanf(ptr,"%2X",&rbyte);	/* get a byte */

> This should give me one of the bytes in rbyte, correct?

Nope.  Read your manual (K&R p246 or THINK C: Standard Libraries Reference p60).  '%X'
returns you an int.  Same thing for printf.

-John
-- 
#include <stdsig.h>

        John Pfeifer                    internet: pfeifer@alw.nih.gov

	"The most creative and holy of men are always quite mad.
	 It is simply a social thing as to wether one is sane or
	 _insane_."				-The Madonna Vampira
From: d88-jwa@byse.nada.kth.se (Jon W{tte)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Touch-a-folder code -- can someone repost?
Date: 10 Apr 92 16:11:44 GMT
Organization: Royal Institute of Technology, Stockholm, Sweden
Originator: d88-jwa@byse.nada.kth.se

.kzoo.edu> k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:

   Someone posted code a while back to "touch" a folder of a changed file,
   thus forcing the Finder to update its listing.  I can't remember what
   exactly the "touch" consisted of, and I neglected to archive that
   particular snippet.

It seems I play the generic folder-code server these days.
Maybe I should unsibscribe :-)

Straight from the treasure chest of my own code, for free:

void
TouchDir ( short vol , long dir ) // If the file is changed within vol , dir
{
	CInfoPBRec info ;
	Name name ;
	short err ;

	BlockClear ( & info , sizeof ( info ) ) ; // Play Safe
	info . dirInfo . ioDrDirID = dir ;
	info . dirInfo . ioVRefNum = vol ;
	info . dirInfo . ioNamePtr = name ;
	info . dirInfo . ioFDirIndex = -1 ;

	err = PBGetCatInfo ( & info , 0 ) ; // Get the info on the folder
	if ( err ) {

		return err ;
	}

	info . dirInfo . ioCompletion = 0 ;
	info . dirInfo . ioDrDirID = info . dirInfo . ioDrParID ;
	info . dirInfo . ioFDirIndex = 0 ;
	GetDateTime ( & ( info . dirInfo . ioDrMdDat ) ) ; // This is now

	err = PBSetCatInfo ( & info , 0 ) ; // Set the modified time

	return err ;
}
-- 
h+@nada.kth.se; Jon W{tte, the Diplomat - NOT!
Newsgroups: comp.sys.mac.programmer
From: ostheim@opal.cs.tu-berlin.de (Joachim Ostheimer)
Subject: no BusErrors when writing to nonexistent NuBusSlot with Quadra
Organization: Techn. University of Berlin, Germany
Date: Tue, 14 Apr 1992 10:09:52 GMT



With the introduction of the quadra, apple changed 
the way the mac reacts to a BusError.
  
The Change: when you try to _write_  to a nonexistent
address -> nothing happens, no BusError as with
any other Mac.
For a hardware projekt, I have to make _even_the_Quadra_
generate a BusError on illegal writes in NuBus
address space.



Joachim Ostheimer 
Technical University Berlin, Germany.
From: wtaylor@mac.cc.macalstr.edu
Newsgroups: comp.sys.mac.programmer
Subject: ResEdit question.
Date: 12 Apr 92 01:52:28 GMT
Article-I.D.: mac.1992Apr11.195228.2420
Organization: Macalester College

help

how would I set up System 7 (I'm using a Classic II) so that it would boot a
program other than the finder?  I'm using ResEdit.

and also, where would I get newer versions of ResEdit? I'm using 1.x now..

please E-mail replies as I don't get to this newsgroup wery often..

Thanks a bunch.

WTAYLOR@MACALSTR.EDU
From: ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Dithering Palette
Date: 13 Apr 92 04:12:51 GMT
Organization: MacDTS, Apple Computer

In article <ktsjbaINN9pl@sal-sun71.usc.edu>, chaoyang@sal-sun71.usc.edu (Chao Yang) writes:
> How do you dither a picture without redraw the picture (or painting) again?
> Like in C, I use palette manager and color quick draw paint several colors,
> how do you change certain colors to another specific colors you want without
> reploting or redrawing?  e.g. all Blue colors --> white colors.  Please
> indicate what function or routine should I use.  Thanks a lot.

First, in the future please try to insert hard carriage returns so your post
will wrap onto multiple lines, for those of us using news readers which require
this.

What you want to do is called palette animation; on an indexed device (1-8
bits, 2-256 colors) it allows you to instantly change an index from one color
to another, changing all the instances of that color on the screen.  It's
a little too complex to describe well in this message, so I'll refer you to
Inside Macintosh; IM V,pg 156, or IM VI, pg 20-10 should get you started;
best of luck.

Tim Dierks
MacDTS, but not nearly as Ren & Stimpy mad as Kent.
Newsgroups: comp.sys.mac.programmer
From: james@ee.uts.edu.au (A. James Boswell)
Subject: GNU g++
Organization: University of Technology, Sydney, Australia
Date: Mon, 13 Apr 1992 00:00:19 GMT
Summary: Is there a version of GNU G++ compiled for the Mac ?
Keywords: GNU G++

Hello,
Has anyone ported G++ to the Mac (NOT AU/X)? I know GNU aren't real
fond of Apple, but if someone has done an unofficial port, I'd love to
know. I have to write some 68k code for a robot, and its for my
undergrad thesis and I want to use my Mac as a development system, and
there's only 8 weeks left, and ....  and ..... ARGHHH PANIC PANIC ...
<SLAP>

Thankyou, I feel better now.

Please, if you can help me, let me know urgently.


A. James Boswell.
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Newsgroups: comp.sys.mac.programmer
Subject: C.S.M.P. Digest v1 #41 Available
Date: 7 Apr 92 10:38:32 GMT
Article-I.D.: cs.1992Apr7.103832.7254
Organization: University of Oregon Computer and Information Sciences Dept.


C.S.M.P. Digest             Tue, 07 Apr 92       Volume 1 : Issue 41

Today's Topics:

	How to get suggestions to Symantec about the THINK products
	Animated cursors


The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.

These digests are available (by using FTP, account anonymous, your email
address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
Questions list.

These digests are also available via email.  Just send a note saying that you
want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
automatically receive each new digest as it is created.

The articles in these digests are taken directly from comp.sys.mac.programmer.
They are not edited; all articles included in this digest are in their original
posted form.  The only articles that are -not- included in these digests are
those which didn't receive any replies (except those that give information
rather than ask a question).  All replies to each article are concatenated
onto the original article in the order in which they were received.  Article
threads are not added to the digests until the last article added to the
thread is at least one month old (this is to ensure that the thread is dead
before adding it to the digests).

Send administrative mail to mkelly@cs.uoregon.edu.

-- 
_____________________________________________________________________________
Michael A. Kelly                                         University of Oregon
mkelly@cs.uoregon.edu                             Computer Science Department
_____________________________________________________________________________
Newsgroups: comp.sys.mac.programmer
From: jcav@quads.uchicago.edu (JohnC)
Subject: Re: How do you get the top, left, width, and heighth  from a WIND resource?
Reply-To: jcav@midway.uchicago.edu
Organization: The Royal Society for Putting Things on Top of Other Things
Date: Fri, 10 Apr 1992 22:01:55 GMT

Here's some code:

TYPE

  WindowTHndl = ^WindowTPtr;
  WindowTPtr = ^WindowTemplate;
  WindowTemplate = record
    bounds: rect;
    procID: integer;
    visible: boolean;
    filler1: boolean;
    goAwayFlag: boolean;
    filler2: boolean;
    refCon: longint;
    title: Str255;
   end; { WindowTemplate = record }


Just use this type to cast the result of _GetResource.  Also, be aware that
System 7 adds additional fields to the window template to implement the new
auto-position feature (and possibly other things I don't know about).


-- 
John Cavallino                  |  EMail: jcav@midway.uchicago.edu
University of Chicago Hospitals |         John_Cavallino@uchfm.bsd.uchicago.edu
Office of Facilities Management | USMail: 5841 S. Maryland Ave, MC 0953
B0 f++ c+ g+ k s++ e+ h- pv     |         Chicago, IL  60637
From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
Newsgroups: comp.sys.mac.programmer
Subject: Re: How do I find out if Multi-finder is running??
Date: 14 Apr 92 17:47:22 +1200
Organization: University of Waikato, Hamilton, New Zealand

In article <22894@goofy.Apple.COM>, ksand@apple.com (Kent Sandvik) writes:
> Sigh, I guess DTS is speaking in vain about not checking for MF presence.

Sigh, I guess us poor programmers are speaking in vain when we keep repeating
all the old reasons for checking for MultiFinder. Here are a couple of obvious
ones:

* Determining whether you will keep running after launching another application
(other postings in this thread have indicated that the appropriate Gestalt
selector is unreliable);

* Determining whether the system heap is resizable, so applications with highly-
variable requirements for longer-term memory storage can do their allocation
there, and don't have to keep telling the user to readjust their partition
sizes.

All flames and lectures regarding the second reason will be autoforwarded to
/get/stuffed.

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
This line intentionally left unfunny.
Newsgroups: comp.sys.mac.programmer
From: ivanski@world.std.com (Ivan M CaveroBelaunde)
Subject: Re: How do I find out if Multi-finder is running??
Organization: The World Public Access UNIX, Brookline, MA
Date: Thu, 9 Apr 1992 12:09:19 GMT

A technique that I've seen mentioned before is using Gestalt on gestaltOSAttr
('os  '). One of the flags returned specify whether a Launch trap can return
to the caller (launchCanReturn or somesuch). I'm not sure, however, which
is the minimum system that supports this Gestalt selector.

Hope this helps,
-Ivan
---
Ivan Cavero Belaunde
DiVA Corporation
From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Anybody interested in a Clock program?
Date: 14 Apr 92 21:23:56 GMT
Organization: Kalamazoo College

In article <34261@unix.SRI.COM> mxmora@unix.SRI.COM (Matt Mora) writes:
>
>I have the partition set at 32k. The app works fine until I try to 
>select a menu. It bombs on menuselect. 
>
>What should I set the stack size to? 
>   (I'm using gworlds and copybits. Didn't copybits used to use the stack? 
>    Does it still?) 

It still does if you're copying less than 3K.  More than that and it
allocates memory.

>Is it trying to save the background bits in my heap?

Probably.

Do try setting all menu-related resources ('MBAR', 'MENU') to be
preloaded, if you haven't already.
-- 
 Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
 Ceci n'est pas une .signature.
Newsgroups: comp.sys.mac.programmer
From: quinn@cs.uwa.edu.au (Quinn "The Eskimo!")
Subject: Re: C++ Critique in comp.lang.c++
Organization: The University of Western Australia
Date: Tue, 14 Apr 1992 01:08:18 GMT

In article <22965@goofy.Apple.COM>, ksand@apple.com (Kent Sandvik) writes:
> 
> In article <1992Apr8.121726.17568@syacus.acus.oz.au>, ian@syacus.acus.oz.au (Ian
> Joyner) writes:
> > 
> > Have Apple made a mistake by adopting the C++ route. I have posted a critique
> > in comp.lang.c++ which may help answer such questions.
> 
> You might as well ask why the whole PC computing industry has made a
> mistake by adopting C++. We are not alone in the same boat...
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Great, we're not the only people on the Titanic!  Reminds me of the old
Tom Lehrer song "We'll All Go Together When We Go".

> Cheers,
> Kent Sandvik, Dynamic Language Evangelist
>(all those Algol-based languages are the same anyway).

"True but probably irrelevant."

Quinn "The Eskimo!"   <quinn@cs.uwa.edu.au>  "Real Coke, Diet .sig"
Department of Computer Science, The University of Western Australia
  -- Looking for a good book on Eiffel.

Newsgroups: comp.sys.mac.programmer
From: zobkiw@world.std.com (Joe Zobkiw)
Subject: Re: Writing apps that use plug-ins?
Organization: The World Public Access UNIX, Brookline, MA
Date: Thu, 9 Apr 1992 14:15:49 GMT

<< If I recall correctly, THINK C (or Pascal or both) will, as an
optimization, not include methods in an object that are not called when it
does a smart link, therfore your methods won't exist if you don't use them
from inside the application. >>

I think you're wrong. I've alwasy understoodthat THINK C's Smart Link is 
on a FILE BY FILE and NOT a ROUTINE BY ROUTINE "smartness."


-- 
<--------------------------------------------------->
 joe zobkiw                     zobkiw@world.std.com
 mac.synthesis.MIDI.development.C.asm.communications
>---------------------------------------------------<
Newsgroups: comp.sys.mac.programmer
From: breidenb@Informatik.TU-Muenchen.DE (Oliver Breidenbach)
Subject: Re: Anybody using MS DDE AppleEvents?
Originator: breidenb@hphalle1e.informatik.tu-muenchen.de
Organization: Technische Universitaet Muenchen, Germany
Date: Fri, 10 Apr 1992 10:11:10 GMT


In article <sdt_9jC00UhWM6614h@andrew.cmu.edu>, Brian Patrick Arnold <ba0k+@andrew.cmu.edu> writes:

|> Well, I'm pissed and I think this is absurd.  I need answers today, not
|> next month.

This is not absurd, this is Microsoft.
I seem to recall, that DDE is something like Publish and Subscribe in Windows
3.x perhaps you should refer to the Windows Reference material.

I once bought MS Word 4.0 for the Mac. I sent in my registration card
and now I keep getting all those nifty Windows 3.x informations and
everything about the PC products (I even got an invitation for the Windows
3.0 rollout event) and how I can upgrade to their newest versions, but I
never got any information that there have been several bugfix releases of the
Word 4.0 (Mac) nor have I heard about Word 5 (Mac) and how to upgrade to it.

Call this absurd.

Cheers,

Oliver.
From: trebor@foretune.co.jp (Robert J Woodhead)
Newsgroups: comp.sys.mac.programmer
Subject: Best way to do anti-aliased fonts easily?
Summary: Some advice would be helpful
Keywords: mac color anti-aliased fonts
Date: 6 Apr 92 06:10:20 GMT
Organization: Foretune Co., Ltd.

I have an application that would really like to do some anti-aliased
font displays.  Before I go mucking around with Color Quickdraw I
would like to ask if anyone has an easy way to do the following:

Let's assume I want to display a 24 point font anti-aliased.  I have
available (thanks to BitFont) a nice 96 point font - 4 times the size
in each axis.

This means that each bit in the 24 point font is represented by 16 bits
in the 96 point font.  So, in theory, one could generate an anti-aliased
24 point font from the 96 point font by grouping 4x4 sets of bits,
counting up the number of set bits, and assigning a value to the pixel
based on the number of bits set.

What I am looking for is a simple way to tell Quickdraw "Here is a 96
point font; display it in 24 point with the background color A, the
foreground color B.  If no bits are set in a 4x4 square, use color A;
if all 16 are set, use B, otherwise scale appropriately.  Oh yeah,
please stencil the character onto the screen - so if there are no bits
set in a 4x4 square, and you were going to use color A, don't actually
change that pixel."

Pointers greatly appreciated; will summarize and post the response to
the net.

-- 
+---------------------------------------------------------------------------+ 
| Robert J. Woodhead, Biar Games / AnimEigo, Incs.    trebor@foretune.co.jp |
| "9/13/99 : First nuclear explosion on the far side of the moon"           |
|     --- One of the many headlines in Gainax's "Otaku no Video 1985"       |
Newsgroups: comp.sys.mac.programmer
Subject: FAQ index ?
From: jordi@sc2a.unige.ch
Date: 14 Apr 92 09:59:15 +0200
Organization: University of Geneva, Switzerland

Hi !
I would like to know if there is a FAQ index somewhere ?

Thanks for any help ....

Sincerely,

Steve Jordi                

+-------------------------+----------------------------------------------+
| Dpt of Geophysics       | Fax: + 41 22 205-732                         |
| University of Geneva    |                                              |
| 13, Rue des Maraichers  | E-Mail: Internet:   jordi@sc2a.unige.ch      |
| 1211 GENEVA 4           |         Bitnet:     jordi@cgeuge52.bitnet    |
| Switzerland             |         Compuserve: 70143,3056 (once a week) |
+-------------------------+----------------------------------------------+ 

Newsgroups: comp.sys.mac.programmer
From: mkelly@mystix.cs.uoregon.edu (Michael A. Kelly)
Subject: C.S.M.P. Digest v1 #48 Available
Organization: University of Oregon Computer and Information Sciences Dept.
Date: Sun, 12 Apr 1992 10:48:11 GMT


C.S.M.P. Digest             Sun, 12 Apr 92       Volume 1 : Issue 48

Today's Topics:

	TMON 3.0 secret about screen
	Think C 5.0.2 & sprintf
	Whatever Happend to Vol 2: Internet Prog. Guide?
	Big Arrays in Think C
	Radius and AppleTalk PROBLEMS - Anyone else?
	Big Pictures
	OZ & NZ: Pictoids Package 1.0 NOW AVAILABLE for ftp
	Speaker-independent continuous-speech recognition on a Mac !?


The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.

These digests are available (by using FTP, account anonymous, your email
address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
Questions list.

These digests are also available via email.  Just send a note saying that you
want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
automatically receive each new digest as it is created.

The articles in these digests are taken directly from comp.sys.mac.programmer.
They are not edited; all articles included in this digest are in their original
posted form.  The only articles that are -not- included in these digests are
those which didn't receive any replies (except those that give information
rather than ask a question).  All replies to each article are concatenated
onto the original article in the order in which they were received.  Article
threads are not added to the digests until the last article added to the
thread is at least one month old (this is to ensure that the thread is dead
before adding it to the digests).

Send administrative mail to mkelly@cs.uoregon.edu.

-- 
_____________________________________________________________________________
Michael A. Kelly                                         University of Oregon
mkelly@cs.uoregon.edu                             Computer Science Department
_____________________________________________________________________________