HDTenEightyP/NetNews huggingface dataset:
From: peirce@outpost.SF-Bay.org (Michael Peirce)
Newsgroups: comp.sys.mac.programmer
Subject: Re: how to put indelible serial# in resource fork of app?
Date: 23 Jul 92 00:38:50 GMT
Reply-To: peirce@outpost.SF-Bay.org (Michael Peirce)
Organization: Peirce Software
X-Mailer: uAccess - Macintosh Release: 1.5v4


In article <14kh9qINNds5@agate.berkeley.edu> (comp.sys.mac.programmer), ewylie@ocf.berkeley.edu (Elizabeth Wylie) writes:
> I have a cool piece of shareware on my hard disk which seems to
> handle this whole name/serial number thing quite well.
> 
> It works entirely on the humiliation-ware concept.  Nobody wants
> someone else's name emblazoned on their $10 piece of software. 
> How low can you get?
> 
> So anyway the program makes you send in for your super-secret
> registration code.  This code is a really wierded-out
> checksum/encryption of your name.
> 
> So, for every name, there is a different secret code.  The
> program won't let you have a mismatching code/serial number. 
> It'll just say "Unregistered User".
> 
> Now, you could incorporate the user's name AND the serial
> number.  Use a lot of XORs and tricky bit shifting to get a
> suitable ugly checksum and then convert it to a long (10 digits
> or so) decimal number.
> 
> Anyway, that's what FinderWindows seems to do.  An excellent
> program, by the way.  It adds a windows menu to the finder and
> other programs.  Lets me keep 20 or so windows open on my
> screen and not lose a single one.

My shareware program, AppSizer, does something very similar.  Since
it's a INIT/Control Panel, I added one more twist.  In addition to
simply flashing unregistered copy in its windows, it also puts up
a message once a month that reminds them of this fact too.  This extra
prompt will often remind them even after they get used to the unregistered
user message in the windows.  And a number of my registed users mention
that this is what reminded them to register.

--  Michael Peirce      --   peirce@outpost.SF-Bay.org
--  Peirce Software     --   Suite 301, 719 Hibiscus Place
--                      --   San Jose, California USA 95117
--  Makers of...        --   voice: (408) 244-6554 fax: (408) 244-6882
--            SMOOTHIE  --   AppleLink: peirce & America Online: AFC Peirce
From: fsmah1@acad3.alaska.edu (Mike Hageland)
Newsgroups: comp.sys.mac.programmer
Subject: TextEdit and MacsBug questions!
Date: 31 Jul 92 20:30:13 GMT
Organization: University of Alaska Fairbanks

Another list of questions from a confused programmer.}i

1)  I still have that problem with my program working great under multi-finder
but not under finder.  I got MacsBug which lets me see what my memory looks
like after the program crashes, but this doesn't help me a lot because I can't
seem to figure out what the memory SHOULD look like.  I'm gonna go find a book
on MacsBug today, so that might help, but any suggestions peole have would
be helpful.

2)  What EXACTLY does TEGetText() do?  I have a couple ideas of what it
might do, but IM isn't specific.  One, it might simply return a handle to
the text already in memory under the TERecord.  Or it might create it's own
relocatable space in memory and copy the data over.  If it does the last do
I need to dispose it ever?

3)  When calling TENew(), does it allocate the entire 32k text space or does
it start it off small and keep enlarging it as the text gets larger?

					--Frustrated in Alaska,
					fsmah1@acad3.alaska.edu
Newsgroups: comp.sys.mac.programmer
From: Bruce.Hoult@bbs.actrix.gen.nz
Subject: SourceBug easter egg
Organization: Actrix Information Exchange
Date: Sun, 26 Jul 1992 14:13:59 GMT

Does anyone know if SourceBug (1.0.1) can be persuaded to display the "All
you touch and all you see, is all your life will ever be. (P. Floyd)"
message embedded within it?

-- 
Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
"Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
hard disk that fits in your pocket!"   "Great!  Is it PC compatable?"
From: kenw@ssd.kodak.com (Ken Wieschhoff)
Newsgroups: comp.sys.mac.programmer
Subject: System 7 Emergency Exit Key
Date: 24 Jul 92 14:43:44 GMT
Article-I.D.: pixel.1992Jul24.144344.19703
Organization: Eastman Kodak Company
X-Useragent: Nuntius v1.0



Does anybody have any experience with the Emergency Exit key 
[cmd-opt-esc] under sys 7?  Are there programming 
considerations to look for?  Can it be disabled?

I have a MacApp based application which just puts up the busy 
cursor and requires a reboot to reset.

Any hints would be appreciated.

Kenneth H. Wieschhoff, Jr.	| "If you want to f*** with 
(716)426-3317(w)			| the Eagles, you gotta learn
kenw@ssd.kodak.com			| to fly"  -->Heathers
From: jpugh@apple.com (Jon Pugh)
Newsgroups: comp.sys.mac.programmer
Subject: gDevice^^.gdMode?
Date: 19 Jul 92 00:40:16 GMT
Organization: Apple Computer, Inc.

Is there a place that defines the modes available in a GDevice's gdMode
field?  I suppose the hardware manual does, but it'll take a couple of
days to get it from the library.

I have written an XFCN which returns the current depth of a monitor.  I simply
look at the gdMode field and parse it.  Since my Quadra supports everything
but 16 bit, this is pretty easy.  The modes appear to be:

mode   bits
	128 = 1
	129 = 2
	130 = 4
	131 = 8
	132 = 32
	
I am simply assuming that anything else is 16, but I would like to know
what mode 16 bits really is.  There isn't a missing spot in the progression.

My XFCN is on ftp.apple.com as /pub/pugh/hyperstuff/getdepth.sit.hqx
It will return the mode for 16 bit monitors instead of 16.  If someone
were willing to simply run it and tell me what it says, I would be eternally
grateful (well, maybe for a couple of weeks at least).

So far, every machine I have run this on works.  If there is a proper way
of determining the bit depth, I would be glad to use it.  ;)

Thanx.  Email would be nice, but cc the group, please.

Jon
Newsgroups: comp.sys.mac.programmer
From: jcav@quads.uchicago.edu (JohnC)
Subject: Re: Top Ten Things I'd Like to See in Think Pasal
Reply-To: jcav@midway.uchicago.edu
Organization: The Royal Society for Putting Things on Top of Other Things
Date: Fri, 24 Jul 1992 16:33:58 GMT

In article <de19-240792042122@mac43-pg2.umd.edu> de19@umail.umd.edu (Dana S Emery) writes:
>In article <1992Jul23.110356.14261@rhrk.uni-kl.de>, 
>kemper@millelac.rhrk.uni-kl.de (Michael Kemper [Informatik]) 
>writes in response to article <a69376dd@fairgate.uucp>, 
>paul@fairgate.uucp (Paul Robichaux) who wrote:
>> |>8) Let me "Add File" at a specific point in the project. I guess what
>> |>   I'm really asking for is an insertion point in the project window.
>> 
>> Hmmm. How often do you add a file to your project? Since this function
>> isn't used very often, I don't think your suggestion is a "must".
>
>The point is not how often it is used, but how painfull it is to do when
>one has a large project to add to.  Think P 'Adds' the file to the end of
>whatever segment is at the end (? beginning, sorry, I forget) of the list. 
>I usually drag the segment to the end, then add the file(s), then shift to
>the build order view and drag the file(s) (again) to their proper build
>position.  This is a timeconsuming pain when you already have 125 TCL
>source files/libraries/TBinterface files as overhead.

I think a better solution would be to allow selection of multiple objects in
the Project window.  That way, you could Add multiple files, then drag them
as a group to the preferred location.  Seems cleaner than an "insertion
point" in the Project.  Actually, I can't figure out why multiple-selection
wasn't present from the beginning.

-- 
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
Newsgroups: comp.sys.mac.programmer
From: tinsel@uiuc.edu (Thomas Aaron Insel)
Subject: Re: Multi-Finder vs Finder problem
Originator: tai50080@uxa.cso.uiuc.edu
Reply-To: tinsel@uiuc.edu
Organization: {not speaking for the} University of Illinois at Urbana
Date: Tue, 28 Jul 1992 08:19:48 GMT

fsmah1@acad3.alaska.edu (Mike Hageland) writes:

> 1)  Is there a way to tell a printer to "back up".  I really think there
> must be, but I can't find it.

If you mean, can you make the paper run backwards, I'm pretty sure you 
can do this on an Imagewriter with the right control codes, but I can't
imagine why you'd want to.  When printing from a Macintosh, your program 
just draws the page, and then tells the computer to print it, which it 
does, from top to bottom.  (slightly oversimplified here, but it's the
general idea.)
-- 
Thomas Aaron Insel (tinsel@uiuc.edu)
  I speak for myself, and not for the State or University of Illinois.
  "We must not confuse dissent with disloyalty." -- Edward R. Murrow
Newsgroups: comp.sys.mac.programmer
From: oster@well.sf.ca.us (David Phillip Oster)
Subject: Re: Using CODE rescource files
Organization: Whole Earth 'Lectronic Link
Date: Thu, 23 Jul 1992 08:50:23 GMT

Use think C to build a resourc with code in it, say type 'mCod'm id = 128.
if it has a main procedure
pascal vvoid main(short verb, long *result, ListHandle lh);

then you call it form your main program with:
	Handle	h;
	SignedByte	state;
	long		res;

	if(NIL != (h = GetResource('mCod', 128))){
		state = HGetState(h);
		HLock(h);
		CallPascal( 3, &res, lh, *h);
		HSetState(h, state);
	}
For a main that is a C procedure, say:
typedef void (*CodeResType_)(short verb, long *result, ListHandle lh);

then, instead of the CallPascal line above, say:
(* (CodeResType) *h)( 3, &res, lh);
From: Chewy@cup.portal.com (Paul Frederick Snively)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Does mac exec code on disk when mounting it?
Date: Wed, 22 Jul 92 22:23:42 PDT
Organization: The Portal System (TM)

As has been noted, there are a variety of Mac viri (WDEF, MDEF, CDEF, MBDF)
that operate on the principle that old (pre-System 7.0) desktop files are, in
fact, resource files, and that they are used by the Finder to draw the icons,
etc. for any given disk, so yes, it's possible to write a virus that gets in
the way simply by mounting an infected disk.

Having said that, let me add that I understand your concern about your virus
detection software being totally up-to-date, but I'm firmly convinced that it
is unwarranted.  John Norstad of Northwestern University is a good friend who
put up with a lot of my stupid questions etc. when I lived in suburban
Chicago, and he has done the Macintosh community an incalcuable service by
writing and religiously maintaining Disinfectant, which as of this writing
detects all known Macintosh viri, and can _repair_ the damage done by all but
two of them.

The question then becomes: how can I ensure that I always have the latest
Disinfectant?  And the answer is: anonymously FTP to ftp.acns.nwu.edu and
look in the pub/disinfectant directory.

Disinfectant is free, and while it's John's programming skill that goes into
it, its ability to deal with all known Mac viri is strongly influenced by the
contributions of literally dozens of Mac programming/virus experts via this
forum, The Internet.  In my opinion, efforts such as Disinfectant do the most
that can be done to validate the concept of an open, global resource for
sharing information such as this network.

Ok, I'll get off my soapbox now... ;-)

Thanks for listening,
Paul Snively
Dissolute Wandering Hacker
chewy@apple.com
Newsgroups: comp.sys.mac.programmer
From: jcav@quads.uchicago.edu (JohnC)
Subject: Re: Dialog hook function problem...
Keywords: Dialog hook
Reply-To: jcav@midway.uchicago.edu
Organization: The Royal Society for Putting Things on Top of Other Things
Date: Thu, 30 Jul 1992 18:21:27 GMT

In article <55560@mentor.cc.purdue.edu> benescc@mentor.cc.purdue.edu (Chris Benes) writes:
>I am having a bear of a time trying to get a customized
>"Save as..." dialog box to work.
>
>I receive the following error when my dialog hook function 
>exits after being called by CustomPutFile :
>
>	Unimplemented instruction at 00000100
>	No procedure name
>
>I am working in Think C 5.0.1 under System 7.0.1 on a Mac IIci 
>with 5 Mb.

Did you declare your hook function with the "pascal" keyword?  This is
required for all Toolbox callback functions.  (I know, except for the ones
that must be written in assembly language, but they're rare)

-- 
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
Newsgroups: comp.sys.mac.programmer
From: dedrad
Subject: Init, DRVR advice sought (2nd try)
Reply-To: dedrad@arco.com
Organization: arco.com
Date: Fri, 31 Jul 1992 15:19:59 GMT

I think my mailer bounced this the first time so this is my second try:

I'm in the midst of writing an init which adds a menu to the menubar.
Right now I see two potential paths I can take to accomplish this :  
1)  Patching Drawmenubar to add what I want, then possibly patching
MenuSelect to do the mouse tracking for my added menu.  
or 
2)  Loading a DRVR which attaches a menu for me.  
I'm having reasonable success with path 1), but I don't like it because
it's not too friendly a method in the already crowded menubar. I have an
old code example of path 2), but it doesn't appear to work well in System
7 - desk accessories refuse to launch with the resident driver in place. 
My main question is:  is path 2) a viable method with system 7?  Sorry
for the vague question, but I can provide more specific code to anyone
who has knowledge in this area.  Reply direct if this is not worth a long
thread on the network.  
Thanks.
dedrad@arco.com
From: mlanett@Apple.COM (Mark Lanett)
Newsgroups: comp.sys.mac.programmer
Subject: Re: GCC under MPW Shell.
Date: 28 Jul 92 07:06:37 GMT
Organization: Apple Computer Inc., Cupertino, CA

glalonde@VNET.IBM.COM ("Glen Lalonde") writes:

>I recall reading on the newsgroup that the GCC port to MPW requires the
>MPW assembler. Is this correct? Can I possibly get around this some how?
>I guess GAS was not ported.

Yes, Asm is required. GCC is like many unix compilers in that it only converts
to assembly and lets the system's assembler handle the rest. It makes
porting easier.

Not only is Asm required, so are the MPW C 3.1 (not 3.2) headers and libraries,
for which you'll need to look on an older dev. cd. MPW C is also required
to compile it (if you modify the sources; I don't remember if the distribution
includes a binary).

GCC 2.2 is under way, and someday in the (distant) future GAS may be available
also. But don't hold your breath. I'll let the people actually involved say
more.
-- 
Have a bajillion brilliant Jobsian lithium licks.
Mark Lanett, NOT speaking for anyone. Personal opinion only.
Newsgroups: comp.sys.mac.programmer
From: jcav@quads.uchicago.edu (JohnC)
Subject: Re: Things That May Become Dim
Reply-To: jcav@midway.uchicago.edu
Organization: The Royal Society for Putting Things on Top of Other Things
Date: Wed, 22 Jul 1992 17:16:44 GMT

In article <1992Jul22.111616.3574@reed.edu> orpheus@reed.edu (P. Hawthorne) writes:
>Is depending on the enableFlags of a MenuHandle asking for trouble? Say,
>to disable all items in a single blow, or to find out swiftly whether any
>commands are enabled?

Since the menu definition procedure uses the enable flags to determine the
enabled-ness of an item, it's probably safe to use them.  Calling
_DisableItem with an item number of zero is defined to disable the entire
menu at once, overriding the individual item enable flags.  _EnableItem with
item zero removes this "override".  One note: there are only 31 possible
enable flags (plus one for the menu as a whole).  Any additional items are
defined to always be enabled.  Of course, if your menu has more than 31
items and is not a Font menu, something is wrong. :-)

>If all of the commands in a menu are dimmed, should the menu's title on
>the menu bar also be dimmed?

That's what the interface guidelines say, and it makes sense.

>If a non-movable modal dialog is up, should all of the menu titles on the
>menu bar be dimmed, since you can't use them? What if one of the menus is
>hilited to begin with, such as the Apple menu after bringing up an about
>window that goes away as soon as you click?

The guidelines say that menus and menu items that aren't available should be
dimmed.  Before System 7, you couldn't click anywhere outside a modal dialog
box, so it made sense to disable the entire menu bar.  Since System 7, Apple
recommends that the Apple, Edit and other system menus remain available during
modal dialogs.  I think the system handles this auto-magically for most cases.

>Should the menu bar be visible when the application has just been
>launched and the splash screen is hanging out?

I think that's up to the programmer.  I wouldn't show the menu bar until the
application was ready to interact with the user.

>If a dialog window is deactivated, perhaps by the application being
>suspended or another dialog coming up, should the dialog items be
>dimmed? 

I think so.  You should certainly dim things that look different when
they're "inactive", such as scrollbars, text selections/insertion points,
and default button outlines.

-- 
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
Newsgroups: comp.sys.mac.programmer
From: poon@parc.xerox.com (Alex Poon)
Subject: floating windows in MacApp
Organization: Xerox PARC
Date: 24 Jul 92 18:22:56 GMT

Anybody know how to create floating windows in MacApp 3.0?
The documentation says to use TFloatWindow, instead of TWindow,
but that doesn't seem to do anything.

Thanks,
poon@parc.xerox.com

Newsgroups: comp.sys.mac.programmer
From: eyes@cs.ubc.ca (Eye Care Centre)
Subject: Re: Creating a floating palette in MacApp
Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
Date: Thu, 23 Jul 92 03:13:06 GMT

In article <poon.711840774@roo> poon@parc.xerox.com (Alex Poon) writes:
>I want to create a floating palette in MacApp, much like Hypercard's tools
>window.  I'd also like it to be resizable and scrollable.  I've created
>a palette view in MacApp as a subview of TGridView, but the window that
>it's installed in becomes hidden when another window is activated
>on top of it.  I want the palette window to always be showing, and I don't
>want any sense of it being activated or deactivated.

MacApp 2.0.1 has floating window support provided in a folder containing
experimental enhancements (I forget the exact name of the folder). Just
move the files in this folder to your MacApp libraries sources folder and
examine the included examples to see how to use the new classes.

MacApp 3.0 has a built-in TFloatingWindow class. I'm not sure if it supports
resizing, though, not having used it yet.

Bill Kiss, Programmer
Dept. of Ophthalmology, UBC
From: umdenbo0@ccu.umanitoba.ca (David A. Denboer)
Newsgroups: comp.sys.mac.programmer
Subject: Chapter 6 of Mac C Prog. Primer 2nd Ed.
Keywords: REMINDER.c
Date: 29 Jul 92 20:09:48 GMT
Organization: University of Manitoba, Winnipeg, Canada

Has anyone got the program called Reminder in the THINK C programming
primer volume 1 2nd Edition to work?
This is the line that won't compile for me...
reminder->notify.nmResp = &LaunchResponse;

It gives me a pointer types don't match error for "&LaunchResponse"

LaunchResponse is the function that I am using to post a notification

Anyway, if you have had trouble with this, and gotten it to work, let me know
how you did it!!!

Thanks,
David A. denBoer
umdenbo0@CCU.UManitoba.CA
Musi Computer Products
Macintosh Users Show Intelligence
From: peirce@outpost.SF-Bay.org (Michael Peirce)
Newsgroups: comp.sys.mac.programmer
Subject: Re: Worth the trouble???
Date: 31 Jul 92 05:35:37 GMT
Reply-To: peirce@outpost.SF-Bay.org (Michael Peirce)
Organization: Peirce Software
X-Mailer: uAccess - Macintosh Release: 1.5v4


In article <1992Jul30.214442.17195@gmuvax2.gmu.edu> (comp.sys.mac.programmer), jedwards@gmuvax2.gmu.edu (James Edwards) writes:
> Anyone have any thoughts on the program RESOURCER?  I do have a warm
> place in my heart for ResEdit, but would like something more powerful.
> I had read some good things about Resourcer, but so far, in several
> attempts, have not been able to get hold of anyone at the company to ask
> any questions about the product.  I do get a rather lengthy message on
> an answering machine, asking if I would like a demo sent out.  I've left
> two messages requesting one, and after several weeks, still haven't seen
> it.  As good as the product is, if this is the quality of tech support,
> I'm not sure I want to dump a couple of hundred dollars on it.

I like Resorcerer.  It has a number of resource editors that are better
than ResEdit (like for Balloons).

I do still keep ResEdit around though, as I like a number of its editors
better than those in Resorcerer.

I guess I use Resdit more, but Resorcerer is a nice compliment to
ResEdit.

--  Michael Peirce      --   peirce@outpost.SF-Bay.org
--  Peirce Software     --   Suite 301, 719 Hibiscus Place
--                      --   San Jose, California USA 95117
--  Makers of...        --   voice: (408) 244-6554 fax: (408) 244-6882
--            SMOOTHIE  --   AppleLink: peirce & America Online: AFC Peirce
Newsgroups: comp.sys.mac.programmer
From: sch@mitre.org (Stu Schaffner)
Subject: Re: C and C++ development on the Mac
Followup-To: comp.sys.mac.programmer
Organization: MITRE Corp.
Date: Wed, 22 Jul 1992 16:15:21 GMT

In article <aland.711733679@chaos.cs.brandeis.edu>,
aland@chaos.cs.brandeis.edu (Alan D.) wrote:
> 
> 
> Depending on the size of the company, I might agree.  However, Think C
> is not a proprietary language.  It has some Think-specific EXTENSIONS
> to ANSI C, but you can 1) not use them, and 2) turn them off.  It's
> definitely an excellent environment.  MPW is nice as well; it's more
> Unix-like with a CLI, and it still allows graphical control via the
> Commando interface.

Ouch, another flame war. IMHO (not a fact), Pascal lost favor because
different groups offered different extensions and the users were unable to
resist using and becoming dependent on those features.  I know this isn't
an object-oriented newsgroup but I can't imagine a bunch of Prolog
programmers being able to resist using the OOP extensions. As for being
proprietary, I just meant that salespeople aren't exactly deluging me with
mail about other implementations of C+-. 

> 
> In short, Stu has a point that you can get both; on a major project
> the thousand dollars (now $1250) is not a factor.  However, since you
> can get Think C for $189 or less, if price is a factor there is _no_
> reason not to get it.  And many reasons to get it. ;)
> 

I think it would be silly not to evaluate the Think system, even if you
eventually go with something else.  Even though I no longer use it, I still
like many of its features.

Stu Schaffner, not speaking for
The MITRE Corp.
sch@mitre.org
Newsgroups: comp.sys.mac.programmer
From: niko@iastate.edu (Nikolaus E Schuessler)
Subject: Re: THINK C 5.0 Code overflow
Keywords: error,C programming, THINK C 5.0, Mac
Organization: Iowa State University, Ames, IA
Date: Mon, 27 Jul 1992 19:31:50 GMT


>
>What I think you menat was

sed s/menat/meant/ :-)

>
>{
> ...
> char *x;
> x = (char *) malloc(1000 * sizeof(char));
>
>}

Yeah.. I though I put 'You should change a declaration like...' in front of the
char x[1000];

sorry...



-- 
Niko Schuessler               
Project Vincent Systems Manager              email: niko@iastate.edu
Iowa State University Computation Center     voice: (515) 294-1672
Ames IA 50010                                snail: 272 Durham 
Newsgroups: comp.sys.mac.programmer