HDTenEightyP/NetNews huggingface dataset:
From: drutman@sol.UVic.CA (D. Rutman)
Subject: How might one patch the OS to automagically  reboot during hw/sw except
Summary: How might one patch the system to automatically reboot the unattended m
Keywords: exception reboot macsbug kiosk how
Organization: University of Victoria
Distribution: comp.sys.mac.programmer
Date:  2 Jan 93 00:15:07 GMT

I  have a MMind director presentation using a dvi card that sometimes fails. I would like to ensure that the mac will reboot automatically in the event of any
software or hardware exception. The mac is in an unattended kiosk so if it crashes, no one will fix it. So until  I pin down whether the cause, I'd like to cylce the cpu and satrat from scratch. Any suggestions?

=dr=

Deborah Rutman
Newsgroups: comp.sys.mac.programmer
Subject: Re: What am I doin wrong? (One down, one more to go)
From: t303grey@vax1.mankato.msus.edu
Date: 28 Dec 92 22:54:02 -0600
Distribution: usa
Organization: Mankato State University

In article <1992Dec28.224411.22427@news.acns.nwu.edu>, geek@casbah.acns.nwu.edu (Myrland Gray) writes:
> 
> It looks to me like the problem is that you are passing the address of the
> handle to your pixmap, rather than a pointer to a pixmap. In other words, with
> your first parameter to CopyBits, three dereferences are necessary in order to
> access the contents of the pixmap. However, CopyBits will only do a single
> dereference of its first (and second) parameters to get to the "guts" and so
> who really knows what you were blasting into your window (if anything). The fix
> is to lock your pixel map, pass *pixBase (maybe type-casted as a BitMap* ???),
> and then unlock your pixel map. That should work. I've done exactly what you
> seem to have done so many times, I could solve this in my sleep!
> 
> As some of the other responses to your query have pointed out, the routines you
> are using are specific to system 7. Just make sure that's really what you want.
> 
> Joey Gray
> geek@casbah.acns.nwu.edu
> 

  That did it. Thanks. Do you have any idea why palette manager isn't working?
(problem 2:)

  Yes I'm writing sys7 Depemdent app.

DevilCat

Newsgroups: comp.sys.mac.programmer
From: keith@taligent.com (Keith Rollin)
Subject: Re: Distinguishing FrontClicks?
Followup-To: comp.sys.mac.programmer
Organization: Taligent
Date: Mon, 4 Jan 1993 04:53:53 GMT

In article <absurd-030193142840@seuss.apple.com>, absurd@apple.apple.com
(Tim Dierks, software saboteur) wrote:
> 
> Tim Dierks
> MacDTS, but I speak for myself and my Albert Einstein doll

Hmm...looks like DTS still has that x-mas gift swap at the end of the
year...

-----
Keith Rollin
Phantom Programmer
Taligent, Inc.
Newsgroups: comp.sys.mac.programmer
Distribution: world
From: sharkman@magicbb.uucp (Matt Daw)
Organization: MAGIC - Macintosh Awareness Group In Canada
Date: Tue, 29 Dec 1992 13:26:50 EST
Subject: Version Resources

Is there any special code needed to use version resources in System 7? I'm
using Think Pascal...
Newsgroups: comp.sys.mac.programmer,comp.os.ms-windows.programmer.tools,comp.windows.ms.programmer
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Subject: Re: porting windows app to mac
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Wed, 23 Dec 1992 11:19:10 GMT

In <BzoKq6.K3y@fiu.edu> richard@serss0 (Richard A Simm) writes:

>I need to know what tools are available to do the port rather than a straight
>port of the program. Also, what software do I need in addition to the tools
>to get the development work done. I know I need C++. Is MPW a good package?
>What resource editors are available? How about debuggers?

Either you buy MPW and C++ as ETO; for $1250 you'll get a CD ROM
chock full of everything you need (C, C++, Pascal, shell, asm, ...
+ tools + documentation) including 2 source debuggers, one low-level
debugger and the 2nd best resource editting tool there is
(plus the resource compiler "rez")

You could probably save a few 100 bucks by buying just MPW+C+C++
and then Inside Mac separately, but that's no great idea.

OR you could plunk down $250 and take home Think C++, which is
not available yet... However, it comes with source debugger,
and the same resource editor (ResEdit) and lo-level debugger
(MacsBug) as MPW, but you have to buy reference material separately.

A subscription to develop at $30 will give you a CD full of
reference material and testing tools + sample code.

>Finally, what would be a good mac system to get the development work done on?
>We don't plan on spending much money on this project.

You _need_ a CD ROM. If you want to save money, try a IIvx with
CD ROM reader and 16" screen, else go for a Quadra (hmm, wait a
month or two maybe, since there are rumors about new 040 machines)

Maybe a used Quadra 700? Macs break very seldom.

Oh, and ResEdit and MacsBug are also available from ftp.apple.com
for free.

Cheers,

							/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
  "It was, in fact, cool as all get-out.  Fortunately it was a little
   too late (historically speaking) to be groovy."
                     -- Dennis Pelton
Newsgroups: comp.sys.mac.programmer
From: d88-jwa@hemul.nada.kth.se (Jon Wtte)
Subject: Re: Why the Piracy? Here's why...
Organization: Royal Institute of Technology, Stockholm, Sweden
Date: Tue, 22 Dec 1992 20:47:03 GMT

In <1992Dec21.191238.28334@netcom.com> howard@netcom.com (Howard Berkey) writes:

>Regardless of what the SW costs, free is still cheaper.  Lower costs won't
>affect piracy.

Do I smell a beginning flame? Did the christmas tree catch
fire? :-)

Yes it would. Presently, I use a copy of MS word that's
sponsored by MS for the College I attend. Mostly, I do school
work with it, which is OK, but sometimes I don't, which isn't.

However, at a price of $1000 or more, would I buy it? No.
I would at a price of $100, but then they wouldn't afford
to put in that &%$ JUNK in it (which I remove to save space
on my cramped disk anyway)

Why not sell the extras as add-ons, and be REALLY CHEAP with
the base product? Or would people think "I bought Word, so
it's OK to use the Old Latin grammar checker I "borrowed"
from a friend of a friend."

Cheers,

							/ h+

-- 
 -- Jon W{tte, h+@nada.kth.se, Mac Hacker Deluxe --
   The word "politics" is derived from the word "poly", meaning
   "many", and the word "ticks", meaning "blood sucking parasites".
                     -- Larry Hardiman
Newsgroups: comp.sys.mac.programmer
Newsgroups: comp.sys.mac.programmer
Subject: What am I doin wrong?
From: t303grey@vax1.mankato.msus.edu
Date: 27 Dec 92 13:30:08 -0600
Organization: Mankato State University

  Please read the code following and tell me why it not working. I'm totaly
lost in these cases and have no other way to find an enlightment other than
asking the infinite wisdom of the net.

*** problem 1: (Error checking code are deleted, assume best case)

    GetGWorld( &oldPort, &oldDevice );
    Err = NewGWorld( &offWorld, 8, &theScreen, NULL, NULL, 0 );
    SetGWorld( offWorld, NULL );
        
    pixBase = GetGWorldPixMap( offWorld );
    LockPixels( pixBase );
    
    EraseRect( &theScreen );

    SetGWorld( oldPort, oldDevice );
         
    CopyBits( &pixBase,
                &(*(GrafPtr) pCWindow).portBits,
                &theScreen, &theScreen, srcCopy, NULL );
        
    UnlockPixels( pixBase );

  Strange thing about this code is if I substitute the 1st argument of CopyBits
call to &(*(GrafPtr) offWorld).portBits it works fine. But according to IM7 we
should never dereference GWorld (p21-5 paragraph 3) to get to pixMap. Right?

*** problem 2: (Again no error checks here. Assume best case)

    pCWindow = GetNewCWindow( 128, NULL, (Ptr) -1 );
    GridColorPalette = NewPalette( 256, GetCTable( ctID ), 
                        pmTolerant + pmExplicit, 0 );
    SetPalette( pCWindow, GridColorPalette, false );
    ActivatePalette( pCWindow );

  When I quit the app contains this code, color palette are never restored to
original even after I dispose pCWindow. If I leave out pmExplicit from
NewPalette call it works fine but it defeat the purpos of cTable. IM7 says
(p20-7 paragraph 6) that when the window is closed Palette Manager should
restore the palette (unless app calls ProtectEntries but I never call it).

Thanks in advance
DevilCat
From: guxu@physics.ubc.ca (Guang Xu)
Newsgroups: comp.sys.mac.programmer
Subject: Using new() and delete() for direct class
Date: 21 Dec 1992 22:38:11 GMT
Organization: The University of British Columbia
Distribution: world
NNTP-Posting-Host: physics.ubc.ca

 I have been using new()/delete() to creat/delete objects which
 are defined as direct class for a while and it never complained
 so far. All a sudden I noticed the following in the Think C User's
 Manual:
 "The new() and delete() functions are not implemented for direct
 classes. You're responsible for allocating space for the
 object yourself. ...". I did notice that deleting a object within 
 it's method ( delete(this)) causes crash, but it's ok if I delete
 the object from outside using delete(theObject). Can anyone explain
 this phenomena?
 After all, are there any existing functions to creat/delete object
 defined as direct class?
From: cconstantine@galaxy.gov.bc.ca
Newsgroups: comp.sys.mac.programmer
Subject: MPW Compile errors, Help!!! (long)
Date: 23 Dec 92 07:59:09 -0800
Organization: BC Systems Corporation

Here is yet another question on MPW C.  In one of my initialze routines, I do a
check to see what kind of system the App is running on.  One of the checks is
to quit if the screen is not in 8-bit mode (256 colors). I used the routine
found in Dave Mark & Cartwright Reed's C book 2, chapter 4 and just modified it
so that all I want is the 8-bit depth.  However, I get the following error
message when I compile:

# 7:55:00 AM ----- Build of AR DataLogger/Mac.
# 7:55:00 AM ----- Analyzing dependencies.
# 7:55:02 AM ----- Executing build commands.
    Rez 'AR DataLogger/Mac.r' -append -o 'AR DataLogger/Mac'
    C -r -i ":Hdrs:" -sym on ":Src:"Main.c -o ":Obj:"Main.c.o
#		pixDepth = GetPixelDepth( curDev );
#		if ( pixDepth <> 8 )
#		               ?     
### Error 22 error in factor
#		                 ?   
### Error 29 ')' expected
#		                   ? 
### Error 30 ';' expected
#		                   ? 
### Error 22 error in factor
#--------------------------------------------------------------------------------------------------------------------------------
    File ":Src:Main.c"; Line 198
#--------------------------------------------------------------------------------------------------------------------------------
#		if ( pixDepth <> 8 )
#			DeathAlert( 6 );
#			         ?       
### Error 30 ';' expected
#--------------------------------------------------------------------------------------------------------------------------------
    File ":Src:Main.c"; Line 199
#--------------------------------------------------------------------------------------------------------------------------------
### MPW Shell - Execution of AR DataLogger/Mac.makeout terminated.
### MPW Shell - Execution of BuildProgram terminated.


I'm pretty sure i'm including everything I need (includeing Types.h, Traps.h &
QuickDraw.h).  Here is the section I call the code from:


void SystemCheck()
{
	long		machineType, qdVersion;
	short		pixDepth;
	GDHandle	curDev;

	if ( !GestaltAvailable() || !System607Available() )
		DeathAlert( errWimpySystem );
	
	if ( !Gestalt( gestaltMachineType, &machineType ))
	{
		if ( machineType < 7 )
			DeathAlert( errWimpyMac );
	}
	
	if ( !Gestalt( gestaltQuickdrawVersion, &qdVersion ))
	{
		if (qdVersion < 0x0200)
			DeathAlert( errNo32BitQD );
			
		pixDepth = GetPixelDepth( curDev );
		if ( pixDepth <> 8 )
			DeathAlert( errNot8Bit );
	}

}


and here is the actual code for the GetPixelDepth:


short GetPixelDepth( GDHandle theDevice )
{
	short			pixelDepth;
	PixMapHandle	screenPMapH;
	
	screenPMapH = (**theDevice).gdPMap;
	pixelDepth = (**screenPMapH).pixelSize;
	return( pixelDepth );
}

pretty short and simple, huh...  Can anyone see what I am doing wrong.

Any help is appreciated.


Carl B. Constantine
CCONSTANTINE@galaxy.gov.bc.ca
From: vollrath@vax.oxford.ac.uk
Newsgroups: comp.sys.mac.programmer
Subject: Re: TCL, Another Question...
Date: 23 Dec 92 17:02:28 GMT
Organization: Oxford University VAX 6620

In article <1992Dec22.184643.29251@fsl.noaa.gov>, urban@yoda.fsl.noaa.gov (Art Urban) writes:
> Slowly but surely I'm getting the hang of this TCL wizardry :-)
> 
> However, I would like to display a "startup" window while the application
> loads, and preps. My question is: where is the best place to implement this
> behavior?
> 
> I have tried putting the code in IMyApp(), after the call to IApplication,
> but since nothing else happens here, my window is displayed and then closed
> in the blink of an eye.
> 
> I suspect I will have to put my startup-window in a global variable, show
> the window during IMyApp(), and then Close() the window in the last method
> which is executed before event looping occurs.
> 
> I've probably missed the obvious, that's why I'm asking the net :-)
> 
> Mucho Thanxo!
> 
> -- 
> Art Urban 					       urban@stout.atd.ucar.edu
> ===============================================================================
>  "What's Next? Chasing bunnies on a motorbike until their hearts explode? -Crow
> ===============================================================================

This is what I did. Created a picture which filled the modal dialog, and
marked it 'enabled' (in effect, it becomes a button). Override CApplication.
StartUpAction and put a call to cmdAbout if there are no preloads. This
displays the dialog until the user presses a return or clicks in the box.
If you would rather put the dialog up for a few seconds and close without
a user response, just put some tick-counting code in the about handler.
Again, I did this in pascal, not C, so there may be differences. I would
leave IMyApp() for initialization, and use StartUpActions for things
you want to do just after your program starts, but after the app/toolbox
is initialized.

Alun ap Rhisiart
Animal Behaviour Research Group
Oxford University
Newsgroups: comp.sys.mac.programmer
From: misc042@cantua.canterbury.ac.nz (Mr M J Miller)
Subject: Re: Beginner's Hierarchical Menu Problem
Organization: from University of Canterbury, Christchurch, New Zealand.
X-Newsreader: TIN [version 1.1 PL6]
Date: Mon, 21 Dec 1992 07:08:02 GMT

Richard J. Resnick (rjr@titan.ucc.umass.edu) wrote:
> I am returning to the Mac environment, and getting stuck (as usual) on
> what seem to be trivialities.
> 
> I am trying to make a simple FONT menu, which will be a hierarchical
> menu under a menu called SPECIAL. I built the resources correctly, and
> the FONT menu, res_id = 100, was built empty in the resource editor,
> so that I could call AddResMenu to load it up.
> 
> My code looks something like this:
> 
> (*Loads up the Desk Accesories in the Apple Menu*)
>   aMenu := GetMHandle(APPLE_MENU_ID);
>   AddResMenu(aMenu, 'DRVR');
> 
> (*Tries to load up the Fonts in the FONT_MENU*)
>   aMenu := GetMHandle(FONT_MENU_ID);
>   InsertMenu(aMenu, -1);
>   AddResMenu(aMenu, 'FONT');
> 
> The error that I get when I run this under Think Pascal is "Think
> Pascal unexpectedly quit", and when I build the application and run
> it, I get a missing coprocessor error. I didn't think that any of
> these routines called for a coprocessor!!

First, use the tracing features of think pascal to find exactly where
things go weird.

Second, I probably am very wrong but I think the call:
hMenu := GetMHandle(menuID); should be called first to LOAD the menu
the call hMenu := GetMHandle(menuID); will simply give you a handle to
that loaded resource (also use GetMHandle when using GetNewMBar).

Third, I think the addresmenu bit should be before insertmenu, perhaps
using a dummy menu just for this purpose (I am probably worng).

Have fun...

Martin Miller.
(I am no way employed by,
	or a spokesperson of
		the University of Canterbury).
From: ibhan@husc10.harvard.edu (Ishir Bhan)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Sprites
Date: 26 Dec 92 04:49:05 GMT
Article-I.D.: husc.ibhan.725345345

positron@engin.umich.edu (Jonathan Scott Haas) writes:

>Does the Mac have sprites? I'd like to be able to draw something
>in a window, then move it around without disturbing the background
>beneath it. If that works, I'd maybe even like to do fancy stuff
>like collision detection. How can I do this? (If the answer is "Read
>Inside Mac", please tell me which volume I'll want.)

I don't think Macs really have sprites.  I'm not sure how exactly you'd do
this sort of thing.  From what I've heard about QuickDraw GX, it looks
like it may provide this sort of functionality, but it's not really here yet.
-- 
               -  Ishir Bhan -  ibhan@husc.harvard.edu  - 
                                     - - - 
           "The sky and the impossible explode..." -The Cure
Xref: sparky comp.sys.mac.programmer:20562 comp.sys.mac.oop.misc:151
From: edw@distant.uucp (Ed Watkeys)
Newsgroups: comp.sys.mac.programmer,comp.sys.mac.oop.misc
Subject: David Betz and Bob Language
Date: Sun, 3 Jan 93 12:28:01 EST
Organization: Distant Software
Reply-To: edw@distant.uucp
X-Mailer: uAccess - Macintosh Release: 1.6v2

I've started looking into porting Bob to the Macintosh under THINK C 5.0,
and while attempting to compile it, I came across some strange things...

Bob is an OO language like C with C++ classes and without explicit typing.
It was presented in the September '91 _Dr. Dobb's Journal_, and is
implemented as a compiler with a p-code system basically.

It's written in K&R C, and does wierd things with function arguments. For
instance, it'll define a function like this:

do_expr()
{
	...
}

and then call it with arguments! You don't do things like this in ANSI C,
and that's what I know.

Anyway, I was wondering if anyone:

1. Has ported Bob to the Macintosh.
2. Knows of an Internet-reachable email address for David Betz.
3. Knows what the hell is happening with the stuff I described above.

My goal is to introduce Bob to the Apple event object model and create (or
at least start) an application framework which is designed from the ground
up to be scriptable -- and free.

Ed

--
Edwin H. Watkeys III                                   edw@distant.uucp
Distant Software                               dsinc!jabber!distant!edw
+1 215 387 7971                                     edw%distant@bts.com
From: bobert@informix.com (Robert Murphy)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Why the Piracy? Here's why...
Date: 23 Dec 92 21:42:54 GMT
Organization: Informix Software, Inc.

d88-jwa@hemul.nada.kth.se (Jon Wtte) writes:

>In <1992Dec21.191238.28334@netcom.com> howard@netcom.com (Howard Berkey) writes:

>>Regardless of what the SW costs, free is still cheaper.  Lower costs won't
>>affect piracy.

>Do I smell a beginning flame? Did the christmas tree catch
>fire? :-)

>Yes it would. Presently, I use a copy of MS word that's
>sponsored by MS for the College I attend. Mostly, I do school
>work with it, which is OK, but sometimes I don't, which isn't.

>However, at a price of $1000 or more, would I buy it? No.
>I would at a price of $100, but then they wouldn't afford
>to put in that &%$ JUNK in it (which I remove to save space
>on my cramped disk anyway)

Well... yes, they could afford to sell it to you for $100 with all the
extra junk... *IF* they sold it to you directly.

In the U.S., a software company typically gets only 30-40% (or less) of the
suggested retail price; the rest goes to the distributors and dealers who
get the product to the customer.  I don't know about Sweden specifically,
but I know that in most of Europe the distributors and dealers get even
more of the suggested retail price because that price is typically double
the U.S. price, but the software company doesn't charge the distributors
any more.

The upshot is that if a software firm puts a $300 US list price on a program,
then its revenue is the same whether it sells you the program through a
distributor/dealer channel, or it sells you the program directly as a
$100 "upgrade".  This is why, for instance, if you call in to a lot of
software companies for a cheap "upgrade", they don't actually demand any
evidence that you already own the program.

>Why not sell the extras as add-ons, and be REALLY CHEAP with
>the base product? Or would people think "I bought Word, so
>it's OK to use the Old Latin grammar checker I "borrowed"
>from a friend of a friend."

The one way to make software cheaper, for students as an example, is to
lower the "cost of goods" (manufacturing and licensing costs).  For
instance, I believe Microsoft licenses some of its extras from other
companies; they could leave those out of the box and lower the program
cost since they wouldn't have to pay a per-package license fee.  They
could also send you cheap, sketchy manuals and cheap floppies in a cheap
box instead of the expensive, heavy bricks you get at the software store.
This only works, though, if a company expects to sell so many "educational"
versions of a program that it can afford the costs of a separate version.

Bob Murphy
bobert@informix.com
Newsgroups: comp.sys.mac.programmer
From: upstill@netcom.com (Steve Upstill)
Subject: Resource Manager Purging Wierdness
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
Distribution: usa
Date: Wed, 30 Dec 1992 07:00:04 GMT

I know this is the brave new world of unlimited RAM, but here I am 
struggling to live in the world of Mac Plus'es and SE's, so I make 
everything in the world purgeable, including a variety of resources.
I dutifully call SetResPurge(TRUE) so that any changed resources 
(yes, I change them too) get written to disk. But still, under 
low-memory conditions my resources start disappearing on me 
(i.e., they're read in at size 0), implying that they were written 
to disk empty anyway. 

Now, there are ominous hints here and there that if the resource map is 
written to disk and a resource has been purged, then an empty resource 
will be written because, regardless of whether the resource was written 
out at purge-time, it's still empty in memory and so the map is incorrect.
Unfortunately, this is as deep as the discussion gets (??!?), leaving 
only a tantalizing hint to the effect that "yes, we may destroy your data, 
but we're not going to say for sure, or indicate exactly when it might happen."

So it looks like data gets trashed under the following scenario:

1) a purgeable resource gets purged.
2) another resource is marked as changed
3) UpdateResFile() is called (perhaps by CloseResFile()). Because the map 
has changed, the file gets written. Because the resource from 1) was 
purged, its handle is empty and thus gets written empty.

I can't believe that this can happen this way, yet I am at a loss to 
otherwise explain the 0-length resources that keep cropping up. Any clues?

Thanks,
Steve Upstill